Jump to content

Directory index forbidden by option directive:var/www/html


Shyamala

Recommended Posts

The issue is the Virtual host settings in our httpd.conf file does not gets recognised. If  I access the  Ip mentioned in  the Vhost settings I go to the Redhat default page.

 

The paths var, var/www,var/www/html all have 777 access permission.

 

We are using RHEL Version 5 OS

 

Settings in httpd conf********

 

NameVirtualHost n.n.n.n:80

 

ServerAdmin n.n.n.n

Servername n.n.n.n

DocumentRoot "/var/www/html/mysite"

 

**********END of httpd.conf

 

 

The error that i get in my log is "Directory index forbidden by option directive:var/www/html"

Link to comment
Share on other sites

Try:

 

NameVirtualHost *:80

<VirtualHost *:80>

    ServerAdmin webmaster@dummy-host.example.com

    DocumentRoot /var/www/html/mysite

    ServerName computername.com

    ErrorLog logs/dummy-host.example.com-error_log

    CustomLog logs/dummy-host.example.com-access_log common

</VirtualHost>

 

Its definately a vhost issue.

 

-steve

Link to comment
Share on other sites

Thanks for your support.We solved the issue by setting

this

 

Name VirtualHost *:80

 

<VirtualHost *:80>

ServerName n.n.n.n

DocumentRoot /www/domain

</VirtualHost>

 

We are unable to access url://n.n.n.n from inside the

host machine. This problem surfaced yesterday, even

before we made the above mentioned settings. What are

the reasons for inability to access IP from inside

host. Thanks once again for your prompt support.

 

Link to comment
Share on other sites

What are

the reasons for inability to access IP from inside

host.

 

If you using the hostname (or even the WAN ip) your computer will try and resolv the host to ip via DNS ovber the internet. A quck fix is to place...

 

192.168.1.4 domainname.com

 

(Using your owm ip and domain name of course) into your /etc/hosts file (on Linux). This file also exists in windows but I'm not sure where. Just search for hosts.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.