VectorLinux
December 22, 2014, 04:24:30 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: [solved] lighttpd alternate server.document-root  (Read 5026 times)
MarkGrieveson
Vectorian
****
Posts: 531


« on: October 08, 2012, 08:52:27 am »

Hello.  I am trying to change the server.document-root of lighttpd, but I can't seem to get it to work.  When I do so, it gives me a 403 - Forbidden error.

Here is a relevant section from my lighttpd.conf file:

Code:
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
#server.document-root        = "/var/www/htdocs-lighttpd"
server.document-root = "/media/Extra/www/htdocs-lighttpd"

When I use the first server.document-root ("/var/www/htdocs-lighttpd"), it works.  However, the second one, which is on a hard drive with more space, does not work.  I have copied the "www/htdocs-lighttpd" directory from "/var/" to "/media/Extra/", and ensured that the ownership and permissions are the same:

Code:
vector://
root:# ls -l var
drwxr-xr-x  3 lighttpd lighttpd 4096 Sep 25 12:33 www/

root:# cd var
vector://var
root:# ls -l www
total 4
drwxr-xr-x 9 root root 4096 Oct  8 11:37 htdocs-lighttpd/

vector://var
root:# cd /media/Extra
vector://media/Extra
root:# ls -l
drwxr-xr-x  3 lighttpd lighttpd  4096 Oct  8 12:22 www/

vector://media/Extra
root:# ls -l www
total 4
drwxr-xr-x 2 root root 4096 Oct  8 12:26 htdocs-lighttpd/

I've obviously neglected to do something, but I'm not sure what.
« Last Edit: November 14, 2012, 12:30:26 pm by MarkGrieveson » Logged

I am using VL7.0 standard with XFCE
M0E-lnx
Administrator
Vectorian
*****
Posts: 3195



« Reply #1 on: October 08, 2012, 12:05:30 pm »

What about the permissions for the stuff inside your new document-root dir?
And server.username ?
Logged

MarkGrieveson
Vectorian
****
Posts: 531


« Reply #2 on: October 08, 2012, 02:05:05 pm »

I'm pretty sure I cloned the permissions that were in the original directories of /var/www/, and nothing else was changed besides the location of the server.document-root within lighttpd.conf, so I'm not sure how the server.username could be an issue.
Logged

I am using VL7.0 standard with XFCE
MarkGrieveson
Vectorian
****
Posts: 531


« Reply #3 on: November 14, 2012, 12:29:59 pm »

Thanks M0E-lnx.  I rechecked this and discovered you were right.  When I recursively changed the owner and group to lightthpd for all the files, it worked.
Logged

I am using VL7.0 standard with XFCE
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!