VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: [solved] lighttpd alternate server.document-root  (Read 5633 times)

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
[solved] lighttpd alternate server.document-root
« on: October 08, 2012, 09: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: [Select]
## 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: [Select]
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: 3279
Re: lighttpd alternate server.document-root
« Reply #1 on: October 08, 2012, 01:05:30 pm »

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

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
Re: lighttpd alternate server.document-root
« Reply #2 on: October 08, 2012, 03: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
Re: lighttpd alternate server.document-root
« 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