Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

403 - Forbidden - Lighttpd

Posted on 2010-09-04
4
Medium Priority
?
1,795 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 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month7 days, 22 hours left to enroll

824 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