0

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?

Caleb
  • 11,583
  • 4
  • 35
  • 49
Damiano
  • 11
  • 1
  • 3

2 Answers2

2

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.

pconcepcion
  • 334
  • 6
  • 16
  • I've checked... the problem are the permissions. – Damiano Apr 26 '11 at 08: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 08: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 08: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 08: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 08:57
  • you mean: website1:lighttpd - website2:lighttpd - website3:lighttpd ? in this mode all the vhosts can read themself no? they have the same group. No? – Damiano Apr 26 '11 at 09:03
  • @Damiano, check your other question for the explanation. – pconcepcion Apr 26 '11 at 09:17
0

Check this in Debian/Ubuntu family distros:

cd /etc/lighttpd/conf-available &
lighttpd-enable-mod fastcgi-php &
service lighttpd restart &
apt-get install php-cgi &
service lighttpd restart
Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47