LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-08-2012, 12:31 PM   #1
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Rep: Reputation: 95
lighttpd alternate server.document-root


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.

I am using Vector Linux 7.0. The version number of the package I have installed of lighttpd is 1.4.31-i586-1vl70, which presumably reflects the version of lighttpd I'm using.
 
Old 10-09-2012, 12:38 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,610

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
What are the permissions on /media?
 
Old 10-29-2012, 07:19 AM   #3
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Original Poster
Rep: Reputation: 95
Permissions of /media are the same as /var:

Code:
drwxr--r-- 19 mark mark 4096 Oct  8 12:22 media/Extra/
drwxr-xr-x  17 root root  4096 Oct 29 08:15 media/
drwxr-xr-x  20 root root  4096 Sep 24 17:46 var/
 
Old 10-29-2012, 03:55 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,610

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
/media/Extra needs to be traversable for group and other. ie: chmod go+x /media/Extra . Lighty (presumably not running as root) can't get to www, so it 403s you.
 
Old 10-30-2012, 12:46 AM   #5
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,033

Original Poster
Rep: Reputation: 95
Yeah, that was it. Permission issue. Thanks.
 
  


Reply

Tags
lighttpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File is not in document root of ... yahretzkee Linux - Server 2 09-09-2011 08:09 AM
Is my server pointing to the wrong root document? Rutherford Linux - Server 7 03-08-2010 11:11 PM
Alternate root user brainlesseinstein Solaris / OpenSolaris 4 07-15-2009 10:45 AM
setting the document root firaysinafets Ubuntu 2 04-07-2005 09:07 AM
Redhat 8 machine on network how do I FTP to web server document root? maxdown Linux - Networking 3 05-05-2003 07:01 PM


All times are GMT -5. The time now is 09:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration