You are not logged in.

#1 2011-03-19 08:04:31

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 106
Website

[SOLVED] 403 from lighttpd for simple page on localhost

I installed lighttpd and wrote a simple html page kep in /home/darenw/http/.  Telling Firefox to visit http://localhost:3000/index.html  (or w/o  the explicit file) only gives me a 403.   The logs in /var/log/lighttpd show only that the server was started, and nothing at all.

It's likely something is misconfigured in my networking.  Perhaps pacman -S (some magic package) will fix it?  What information would be useful to diagnose this problem?

I am no expert at network/sysadmin stuff, but have succesfully set up a home LAN with 4 machines and cable internet, installed Drupal on a university department machine, etc.   My knowledge is like swiss cheese, and lighttpd fell into one of the holes...


Here is lighttpd.conf:
--------------------------------------------------------
server.document-root    = "/home/darenw/http/"
server.port        = 3000
server.username        = "http"
server.groupname    = "http"
server.pid-file        = "/var/run/lighttpd/lighttpd.pid"
server.errorlog        = "/var/log/lighttpd/error.log"
dir-listing.activate    = "enable"
index-file.names    = ( "index.html" )
mimetype.assign        = (
   ".html" => "text/html",
   ".css" => "text/css",
   ".txt" => "text/plain",
   ".jpg" => "image/jpeg",
   ".png" => "image/png"
)
--------------------------------------------------

I run the server with the command: 
   lighttpd -D  -f /etc/lighttpd/lighttpd.conf
or with the script in /etc/rc.d/

Googling turned up people having a problem like this, fixed by increasing permissions of the files and directories served.  Mine are all 777 at this point, but still it's 403.

If it's of any use diagnosing the problem, here's some network config info:

=> route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localhost.local *               255.255.255.255 UH    0      0        0 lo
192.168.0.0     *               255.255.255.0   U     202    0        0 eth0
default         qwestmodem.doma 0.0.0.0         UG    202    0        0 eth0

Last edited by darenw (2011-03-19 08:58:47)


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

#2 2011-03-19 08:54:27

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 106
Website

Re: [SOLVED] 403 from lighttpd for simple page on localhost

Found the solution - it was right here on the Arch forums, but hadn't turned up earlier when I searched here, googled like crazy... only ten minutes ago did I land on the thread wherein another 403 struggler found enlightenment:

"That was it, chmod o+x to $HOME solved the problem. With 'drwx-----x' at $HOME works perfect."

So, solution in my case is simple, just to add x permissions to /home/darenw/ = it works!!


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

Board footer

Powered by FluxBB