Solved

403 - Forbidden - Lighttpd

Posted on 2010-09-04
4
1,722 Views
Last Modified: 2012-05-10
Hi

I am using Lighttpd on Centos 5.5.

when I write http://myserver.com/abc (abc is the name of folder) it shows me the folder in the browser.
However when I define a virtual host and write http://myvirtualhost.com/abc it shows "403 - Forbidden"

Please help me in solving this issue.

I have written the following at the bottom of lighttpd.conf


$HTTP["host"] =~ "www\.mydomain\.com$" {
server.document-root = "/home/myhome/sites/mydomain.com"
#    server.errorlog = "/var/log/lighttpd/error_domain.log"
#    accesslog.filename = "/var/log/lighttpd/access_domain.log"
}
0
Comment
Question by:systemsautomation
  • 2
4 Comments
 
LVL 3

Expert Comment

by:gremwell
ID: 33603191
Does lighttpd process has read and execute privileges to /home/myhome/sites/mydomain.com/ directory?
0
 

Author Comment

by:systemsautomation
ID: 33603310
thanks for the reply.
/home/myhome/sites/mydomain.com has 777 privileges
0
 
LVL 4

Accepted Solution

by:
l4ncel0t earned 500 total points
ID: 33604010
777 for the whole path or just the last folder ?
0
 

Author Comment

by:systemsautomation
ID: 33604190
Thanks.

I changed the vhost folder outside home and gave it 777 and it worked.

Thanks again for your help
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question