I want to change the default location of Apache folder which is (var/www/html).
I am using the Fedora 9 as OS and apache 2 here.
When I inserted the following code in bottom of the httpd.conf file.
<VirtualHost *:80>
Options +FollowSymLinks
ServerAdmin siwan@yahoo.co.in
DocumentRoot /var/www/html/testfolder
ErrorLog logs/error_log_net
TransferLog logs/access_log_net
</VirtualHost>
When tried the http://localhost/ in browser, I got the default browser page.
Then I tried to look my apache error using following command:
#[root@localhost ]# tail -f /var/log/httpd/error_log
In apache error log I got following error.
[Wed Oct 07 15:59:50 2008] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/testfolder/
I changed the AllowOverride option but nothing is happend. Then I read the welcome page text
“To prevent this page from ever being used, follow the instructions in the file /etc/httpd/conf.d/welcome.conf.”
I opend the welcome.conf file.
I found following lines in welcome.conf file.
<LocationMatch “^/+$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
I changed that to as follows:
<LocationMatch “^/+$”>
Options Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
That solve my problem. Some time your selinux will cause the issue so you need to deactivate the selinux.
Some time File permission will also cause the issue.
You can change the file permission using following command, go to that directory and run following command.
#chmod 777 *
Incoming search terms:
- Directory index forbidden by Options directive
- directory index forbidden by options directive:
- directory index forbidden by options directive: /var/www/html/
- directory index forbidden by options directive /var/www/html/
- directory index forbidden by options directive apache
- apache directory index forbidden by options directive
- [error] [client 127 0 0 1] directory index forbidden by options directive: /var/www/html/
- directory index forbidden by options directive: /var/cache/munin/www/
- [client 127 0 0 1] directory index forbidden by options directive: /var/www/html/
- directory index forbidden by options
- directory index forbidden by options directive: /var/www/
- directory index forbidden by options directive /var/www/html/ centos
- directory index forbidden
- directory index forbidden by options directive var www html apache
- directory index forbidden by options directive: /var/empty/
- apache2 directory index forbidden by options directive
- error client 127 0 0 1 directory index forbidden by options directive /var/www/html/
- directory index forbidden by options directive wordpress
- apache Directory index forbidden by Options directive:
- directory index forbidden by options directive var www html
I don’t agree with everything in this blog, but you do make some very good points. Im very interested in this matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.
This is a really good piece of writing, I discovered your blog browsing google for a similar subject matter and came to this. I couldnt find to much different information on this piece of writing, so it was great to find this one. I will be returning to check out some other articles that you have another time.
I don’t agree with everything in this blog post, but you do make some very good points. Im very interested in this matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.
This is a good write-up, I was wondering if I could use this piece on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.
Thank You For This Blog, was added to my bookmarks.
I have a strange problem. If i have index.html in my www dir then 403 error appear. If I replace it with index.php then all OK.
that is ok.
I’ve got this problem at the moment trying to install RoR on CentOS – causing us real problems.
Selinux issue wont get resolved by chmod.. you need to change the selinux access controls
refer: http://wiki.centos.org/TipsAndTricks/SelinuxBooleans