Directory Index Forbidden by Options Directive

Directory index forbidden by Options directive

Either the main httpd.conf or the .htaccess file in this directory or a nearby parent directory probably includes:

Options -Indexes

Your host may have to set it to +Indexes if you don't have access in .htaccess and want to list & browse the directory contents, absent a default index.html, index.php, etc. If the directory should not have a default file and you don't enable Indexes, you may only directly target the filenames of contents within it.

The Indexes option is commonly disabled by default on many Apache installations.

Full details are available in the Apache core documentation on Options

Apache : Directory index forbidden by Options directive:/srv/www/htdocs/testFolder

had to add files explicitly the files in the conf file

<Directory /srv/www/htdocs/HDP-UTILS-1.1.0.20>
Options +Indexes
</Directory>

<Directory /srv/www/htdocs/HDP>
Options +Indexes
</Directory>

Error - Directory index forbidden by Options directive?

Looks like someone disabled directory listing in Apache. If you are allowed to override it with .htaccess just place an .htaccess file in your root web directory with this information:

Options +Indexes

Apache: Directory index forbidden by Options directive

This is certainly something hard to debug, occasional bugs are the worst ones :-)

My first thoughts were "internal dumy connections" related issues, but that would not show you an IE8-beta signature in access.log.

So I found three links that you may investigate:

  • A serverFault intermittent 403 problem, related to mod_negotiation and SSI
  • Another serverFault intermittent 403, related to MaxClients reached, check that you do not reach MaxClients when that error appears.
  • A deep analysis of intermittent 403 related to mod_cache

From that I think this kind of problem is a little like drug interactions. So the first thing to do is:

  1. Check the modules loaded in your apache configuration and remove (comment Load lines) the ones you do not need at all (and you will have a faster Apache if you never did it before!).
  2. Build a test environment, for modules that you are still using in production (where removing it would make your application crash). You'll need to be able to reproduce the bug with wget or ab or any other massive HTTP requests tool.
  3. try to inactive modules, one by one, until the problem disappears.

Modules that usually make strange behaviors are:

  • mod_negotiation (with the related Option Multiviews). Apache is then trying to serve alternate files, after a negociation with the browsers headers. That may break your RewriteRules or interact badly with other modules. That usually lead to some unattented responses to malformed queries, I always remove that module.
  • mod_include : Server Side Includes (with related option Includes), also known as SSI. Who really needs that?
  • mod_cache & mod_disk_cache , really, that's a very old school things, you'd better try using Varnish or any other reverse proxy caches
  • mod_rewrite: the swiss knife, but are you sure you didn't wrote a very strange Rule somewhere?
  • mod_dir : check you do not have DirectorySlash Off, that may interact badly with some other module doing strange things
  • mod_isapi : reading the doc may lead you to some hints. For me I have the feeling this is an experimental support, on heavy load I'm quite sure strange things could happen.
  • mod_proxy : remove it if you do not need it

UPDATE: (after configuration details)
Reading your configuration I saw several little mistakes (unrelated):

  • <Directory /> I don't think this will work on Windows, as your root is c: not /. But I'm maybe wrong. At least you do not need an allow from all here, quite unsecure.
  • If you do not use .htaccess files set the AllowOverride None everywhere, especially in a <Directory "C:">, to avoid seeking for theses files from the root directory.

Now for your problem. I do not see any mod_cache related option in your configuration (but maybe you have some included files in subdirectories of apache configuration that use mod_cache directives. If you do not use any of the mod_cache directives you can suspend that module without any risk.

Getting lots of server errors directory index forbidden by Options directive from same referer

I'm running a Wordpress site as well. Recently started seeing the same thing from this referer. The error indicates that binance.com has a page that is attempting to include a directory as though it was a file. Something like this:

<link rel="stylesheet" href="https://website.com/wp-admin/css/">

My guess is that this is actually some kind of security scan unrelated to binance.com that is just using their hostname to distract from the scan itself, or spam/scam to drive traffic to binance.com. It appears there has been a rise in these occupancies in the last week or so. I see others reporting the same thing online. The good news is that your Apache config is such that directory listing is disabled. Directory listing is evil ;)

Directory index forbidden by Options directive error only for ruby 1.8.7 application

If you are on passenger 5 and running ruby 1.8.7 & rails 2 app, you need to add a config.ru to the root of your application:

# config.ru
# Require your environment file to bootstrap Rails
require ::File.dirname(__FILE__) + '/config/environment'

# Serve static assets from RAILS_ROOT/public directory
# use Rails::Rack::Static
# Dispatch the request
run ActionController::Dispatcher.new


Related Topics



Leave a reply



Submit