Lighttpd 403 Errors on HTML and PHP pages
Posted
by
Brian
on Server Fault
See other posts from Server Fault
or by Brian
Published on 2011-02-21T22:29:16Z
Indexed on
2011/02/21
23:26 UTC
Read the original article
Hit count: 842
I installed lighttpd on CentOS 5.5 64-bit. Everything seems fine and running except I cannot get past 403 errors on both HTML and PHP pages. I have used CHMOD and CHOWN, changed ownership in the config file, done everything possible and have been stuck for 2 days. Appreciate any help, and here's hoping to a stupid error on my part.
Here is the log file with debug options on:
2011-02-21 11:23:13: (request.c.304) fd: 7 request-len: 408
GET /index.html HTTP/1.1
Host: 10.0.1.8
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cache-Control: max-age=0
2011-02-21 11:23:13: (response.c.241) run condition
2011-02-21 11:23:13: (response.c.300) -- splitting Request-URI
2011-02-21 11:23:13: (response.c.301) Request-URI : /index.html
2011-02-21 11:23:13: (response.c.302) URI-scheme : http
2011-02-21 11:23:13: (response.c.303) URI-authority: 10.0.1.8
2011-02-21 11:23:13: (response.c.304) URI-path : /index.html
2011-02-21 11:23:13: (response.c.305) URI-query :
2011-02-21 11:23:13: (response.c.349) -- sanatising URI
2011-02-21 11:23:13: (response.c.350) URI-path : /index.html
2011-02-21 11:23:13: (response.c.470) -- before doc_root
2011-02-21 11:23:13: (response.c.471) Doc-Root : /srv/www/lighttpd
2011-02-21 11:23:13: (response.c.472) Rel-Path : /index.html
2011-02-21 11:23:13: (response.c.473) Path :
2011-02-21 11:23:13: (response.c.521) -- after doc_root
2011-02-21 11:23:13: (response.c.522) Doc-Root : /srv/www/lighttpd
2011-02-21 11:23:13: (response.c.523) Rel-Path : /index.html
2011-02-21 11:23:13: (response.c.524) Path : /srv/www/lighttpd/index.html
2011-02-21 11:23:13: (response.c.541) -- logical -> physical
2011-02-21 11:23:13: (response.c.542) Doc-Root : /srv/www/lighttpd
2011-02-21 11:23:13: (response.c.543) Rel-Path : /index.html
2011-02-21 11:23:13: (response.c.544) Path : /srv/www/lighttpd/index.html
2011-02-21 11:23:13: (response.c.561) -- handling physical path
2011-02-21 11:23:13: (response.c.562) Path : /srv/www/lighttpd/index.html
2011-02-21 11:23:13: (response.c.608) -- access denied
2011-02-21 11:23:13: (response.c.609) Path : /srv/www/lighttpd/index.html
2011-02-21 11:23:13: (response.c.128) Response-Header:
HTTP/1.1 403 Forbidden
Content-Type: text/html
Content-Length: 345
Date: Mon, 21 Feb 2011 16:23:13 GMT
Server: lighttpd/1.4.28
Here is the directory listing. I used CHOWN to set to lighttpd:lighttpd
[root@localhost lighttpd]# ls -al
total 40
drwxrwxrwx 2 lighttpd lighttpd 4096 Feb 21 10:48 .
drwxrwxrwx 3 lighttpd lighttpd 4096 Feb 21 10:57 ..
-rwxrwxrwx 1 lighttpd lighttpd 10 Feb 20 08:32 index.html
-rwxrwxrwx 1 lighttpd lighttpd 20 Feb 21 10:48 index.php
-rwxrwxrwx 1 lighttpd lighttpd 20 Feb 21 10:39 info.php
[root@localhost lighttpd]#
Requested Commands:
[root@localhost lighttpd]# ls -ld / /srv /srv/www
drwxr-xr-x 22 root root 4096 Feb 21 04:39 /
drwxrwxrwx 3 lighttpd lighttpd 4096 Feb 20 07:38 /srv
drwxrwxrwx 3 lighttpd lighttpd 4096 Feb 21 10:57 /srv/www
[root@localhost lighttpd]# ps auxZ | grep lighttpd
root:system_r:httpd_t lighttpd 3842 0.0 0.2 48368 896 ? S 12:24 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
root:system_r:unconfined_t:SystemLow-SystemHigh root 3845 0.0 0.2 61152 764 pts/0 R+ 12:24 0:00 grep lighttpd
© Server Fault or respective owner