indexes options not working

Discussion in 'Apache' started by sang_froid, Feb 24, 2010.

  1. #1
    Hi,

    In our apache web server, we have a number of virtual hosts running.

    I wanted to create an alias to a folder only to a specific virtual host. So what I did is, in the
    virtual host configuration section of that specific site, I added as below:


    <VirtualHost *:80>
    ....
    ....
    ...

    Alias /myfiles/ "/webroot/myfiles/"

    <Directory "/data/webroot/myfiles">
    Options -Indexes -ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>

    </VirtualHost>


    However, with this configuration,if index.html is not present in the system , I am still able to see directory listing of all files under that folder myfiles.

    What could be going wrong ? Why "options" directive of is not working once it is placed inside <directory > of <virtualhost> ??


    If I move <directory> in the main httpd.conf (ie , outside virtual host section), then again it works fine. But I don't want this as I don't want other virtual hosts also to be able to access to that directory...

    In the main httpd.conf, I have something like

    <Directory "/data/webroot">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    how to fix this issue ?? any ides ???
     
    sang_froid, Feb 24, 2010 IP
  2. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #2
    Just put this in your .htaccess file:

    IndexIgnore *
     
    RHS-Chris, Feb 24, 2010 IP