Drupal vs Options Indexes? I have an .htaccess file with Options Indexes FollowSymLinks, my /apache2/sites_available/default file also has these options and AllowOverride All.

If I do these things outside of Drupal it's working (if I go to a directory without an index file, I see a file directory listing), but inside Drupal I'm getting 


  The requested page "/sites/default/files/" could not be found.


Also, I am able to to access files within the files directory. For example if I went to /sites/default/files/someFile.pdf... it would be able to access it fine. I want to have it so that if I link to a directory within the files directory and that directory does not have an index file... it will display a directory listing of all the files/folders within. Something like:

http://3.bp.blogspot.com/_rhuioznu6Us/TBmeWAr_G2I/AAAAAAAAAFE/tKCclPXdq2M/s1600/apache.png

I think Drupal is doing something based on the fact that I get my Drupal headers above the message that the page couldn't be found. How do I stop this?

The files below show some of the things I've tried...

apache2/sites_available/default contains:

DocumentRoot /var/www/default              
&lt;Directory /&gt;                              
  Options Indexes FollowSymLinks           
  AllowOverride All                        
&lt;/Directory&gt;                               

&lt;Directory /var/www/default/&gt;              
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All                        
  Order allow,deny                         
  Allow from all                           
&lt;/Directory&gt;


default/files/.htaccess contains

Options +FollowSymLinks
Options +Indexes
RewriteEngine Off
You don't need the Indexes on your web server. Its actually not recommend on a live environment. For testing purpose it can be useful sometimes.

If you don't have your files directory I would recommend you to created a files directory

sudo mkdir sites/default/files # Creating files directory
sudo chmod a+w sites/default/files # Permissions


After that you can you try  this on your default configuration file... 

&lt;DIRECTORY /&gt;
      Options FollowSymLinks
      AllowOverride None
 &lt;/DIRECTORY&gt;

 &lt;DIRECTORY /var/www/drupal_site/&gt;
     Options +FollowSymLinks
     AllowOverride All
 &lt;/DIRECTORY&gt;


Source: https://github.com/darol100/lazydubuntu/blob/master/bin/includes/skeleton

And then re-start your server.

If this does not solve your problem here is a similar question (with the same error)

And here is the answer.


  This is a known problem, a natural result of clean URLs
  
  
  When you are on http://example.com/?q=node/15 and the browser sees a relative "files/filename" path it resolves it as
  http://example.com/files/filename. The ?q= part does not pretend to be
  a path, so the browser does not use it.
  When you are on http://example.com/node/15 and the browser sees a relative "files/filename" path it resolves it as
  http://example.com/node/15/files/filename because it considers node/15
  as a real path.
  
  
  So, when you use clean URLs the file links must have a front slash
  (and possibly a path if Drupal's home page contains an URL path). The
  browser sees the absolute path "/files/filename" and resolves it using
  the bare domain name. You need to edit all the file paths in the
  content and add a front slash.
  
  Alternatively, try the http://drupal.org/project/pathologic module
  which tries to be smart about it (or one of the other modules
  mentioned there).