Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default installation not working (/hardware not found) #129

Closed
FleischKarussel opened this issue Apr 4, 2014 · 6 comments
Closed

default installation not working (/hardware not found) #129

FleischKarussel opened this issue Apr 4, 2014 · 6 comments

Comments

@FleischKarussel
Copy link

Hello there,

I got the problem that after first start I got this message:

Message:
Not Found
The requested URL /hardware was not found on this server.
Apache/2.2.15 (CentOS) Server at snipeit Port 80

I had to fiddle with the permissions, especially for the sessions folder to get rid of the messages with the orange background because the permission to create sessions.
But I have no idea how to get rid of this problem, I just found some folder "hardware" somewhere else.

Does anybody have or had the same problem initially?

Thanks!

vhost conf:

cat /etc/httpd/conf.d/snipeit.conf

<VirtualHost *:80>
DocumentRoot /var/www/html/snipeit/public
ServerName snipeit

Other directives here

CentOS 6:
php54w-cli-5.4.26-1.w6.x86_64
php54w-gd-5.4.26-1.w6.x86_64
php54w-mysql-5.4.26-1.w6.x86_64
php54w-mbstring-5.4.26-1.w6.x86_64
php54w-xml-5.4.26-1.w6.x86_64
php54w-common-5.4.26-1.w6.x86_64
php54w-pdo-5.4.26-1.w6.x86_64
php54w-mcrypt-5.4.26-1.w6.x86_64
php54w-5.4.26-1.w6.x86_64

httpd-tools-2.2.15-30.el6.centos.x86_64
httpd-2.2.15-30.el6.centos.x86_64

Directory Permissions:

ll app/

total 64
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 commands
drwxr-xr-x. 7 root root 4096 Apr 3 14:57 config
drwxr-xr-x. 4 root root 4096 Apr 3 14:57 controllers
drwxr-xr-x. 4 root root 4096 Apr 3 14:57 database
-rwxr-xr-x. 1 root root 3005 Apr 3 14:57 filters.php
drwxr-xr-x. 3 root root 4096 Apr 3 14:57 lang
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 models
-rwxr-xr-x. 1 root root 13769 Apr 3 14:57 routes.php
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 start
drwxr-xr-x. 7 root root 4096 Apr 3 14:57 storage
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 tests
-rw-r--r--. 1 root root 155 Apr 3 14:57 validators.php
drwxr-xr-x. 7 root root 4096 Apr 3 14:57 views

ll app/storage/

total 20
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 cache
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 logs
drwxr-xr-x. 2 root root 4096 Apr 3 15:11 meta
drwxrwxrwx. 2 root root 4096 Apr 3 16:04 sessions
drwxr-xr-x. 2 root root 4096 Apr 3 14:57 views

ll app/storage/sessions/

total 28
-rw-------. 1 apache apache 5244 Apr 3 16:04 sess_7ai2pl5votpq3pau7nff5tcse4
-rwxrwxrwx. 1 root apache 18558 Apr 3 15:17 sess_96mf0p71d0ukolt24ejrddj950

@snipe
Copy link
Owner

snipe commented Apr 4, 2014

Sounds like you don't have your server set up to allow mod_rewrite via htaccess.

@snipe
Copy link
Owner

snipe commented Apr 4, 2014

You ran into permission problems because your web files are owned by root and belong to the root group, btw. It's generally a bad idea to have anything web-accessible owned by root, especially if you're going to be assigning write privileges to them. You'll want to create a web user, chown and chgrp the files to them and make sure they are in the same group as apache, so apache can write to the sessions and views directories.

@FleischKarussel
Copy link
Author

hey snipe,

thanks for your reply.
Now it works when the vhost.conf has beend modified to use mod_rewrite.
Since I strictly tried to stick to your example vhost.conf and mod_rewrite by default is globally disabled, it couldn't have work.
I chown'd all files to the user apache, in some cases it is good idea to own all files by root, for example when you don't the httpd to modify any other files in the same directory, except log or session directories.
Maybe it would be helpful to add this directive to the vhost.conf mentioned in the Readme.
I'll send a pull request for that. :)

Bye
FK

@snipe
Copy link
Owner

snipe commented Apr 4, 2014

Hi @FleischKarussel - we didn't include the permissions structure in the README since that's pretty standard linux web server stuff, and while we want to the read me to be thorough, we also don't want to clutter it up with everything one needs to know about running a web server.

I would argue that it's never wise to have anything owned by root in the web directory. If you want to make sure the files don't get overwritten, change their chmod permissions. That's what permissions are for.

@FleischKarussel
Copy link
Author

Hi Snipe,

Ok I understand your point.
That's some kind of stuff I've done in the meantime I've owned everything to apache.
Should be enough, I need to see if I have to reapply that if there are new git commits I want to pull.
This issue is fixed.

Thanks.
FK

@snipe
Copy link
Owner

snipe commented Apr 8, 2014

My favorite kinds of issues - those that close themselves :)

Glad to hear you got it sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants