Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an index.php page but I continuing to get 404 not found if I digit Www.mywebsite.com/

This is the log:

... www.MYWEBSITE.com - [26/Apr/2011:09:56:33 +0200] "GET / HTTP/1.1" 404 0 "-" "Opera/9.80 (X11; Linux x86_64; U; it) Presto/2.8.131 Version/11.10

The page exists, but I get 404 not found.

What should I check?

share|improve this question
add comment

1 Answer

I'd start checking the root directory for lighthttpd the default page sent (maybe is index.html and not index.php) and file permissions and the user running lighthttpd.

Then I'd check the php configuration (php.ini) and if php is actually processing the php pages.

share|improve this answer
    
I've checked... the problem are the permissions. –  Damiano Apr 26 '11 at 8:30
    
for each vhosts i create user1:group1 user2:group2 etc etc. but lighttpd run with lighttpd:lighttpd... is not good this layout? –  Damiano Apr 26 '11 at 8:31
    
That is good for splitting the security among the different vhosts, but the web server needs at least reading access to the files to actually serve them. –  pconcepcion Apr 26 '11 at 8:38
    
yes, correct, but if I set these permissions 744, ALL the users of the server can read the website's files. I don't think it's really sure. How to set these permissions? –  Damiano Apr 26 '11 at 8:41
    
@Damiano other option can be make the files from the vhosts owned by the group lighttpd, and give rwxr----- permissions to the files and rwxr-x--- to the directories, this way you will limit the reading access between vhosts to the members of lighttpd group. If you don't need to separate vhosts in groups for any other reason (like project separation or something like that) this can be a good solution for you. –  pconcepcion Apr 26 '11 at 8:57
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.