• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Allow directory browsing for one domain

Kroptokin

Regular Pleskian
Hi

I am using Plesk 11.5 on Centos 6.4.

I am trying to achieve directory listing. Normally I would do this by putting:

Options +Indexes

in a .htaccess file.

This isn't working.


EDIT:

OK. I have found out how to add Apache directives through Plesk by going to the web server settings. Accessed by the customer control panel, then clicking on the domain name). But adding Options +Indexes still does not work here.

Any ideas gratefully received.

Thanks

--Justin Wyllie
 
Last edited:
OK. It seems that the default Apache configuration with Plesk (I am on Plesk 11.5) is that if there is no index.html (or index.php I think) file in the root directory of a web site it will show a file /var/www/error/noindex.html. So setting Options +Indexes either in an .htaccess file or through the Control Panel Web Server Settings tab will not work because this - showing an error file if no index file is found takes precedence.

Options +Indexes works perfectly fine in all sub directories.

The fix would probably be to either find this Apache configuration and change it - or possibly adjust the way that 'errors' are handled through the interface. I don't know. After 2 hours on this I decided to use a PHP script to emulate directory listing.
 
Hello,

Please check : http://kb.parallels.com/en/437

Also you can set your own DirectoryIndex through .htaccess for your domain.

Hi InderS,

This used to work with 9/10 but no joy for me with 11. This is a server move and move from a plesk 10 to plesk 11 server, directory browsing used to work, doesn't anymore - even with the custom vhost.conf and apache reboot.

Have a look here:
http://www.techiecorner.com/1822/how-to-remove-apache-test-page-in-centos/

I only turned off the error page, leaving the /etc/httpd/conf.d/welcome.conf looking like this:

Code:
<LocationMatch "^/+$">
    Options -Indexes
#   ErrorDocument 403 /error/noindex.html
</LocationMatch>

OK. It seems that the default Apache configuration with Plesk (I am on Plesk 11.5) is that if there is no index.html (or index.php I think) file in the root directory of a web site it will show a file /var/www/error/noindex.html. So setting Options +Indexes either in an .htaccess file or through the Control Panel Web Server Settings tab will not work because this - showing an error file if no index file is found takes precedence.

Options +Indexes works perfectly fine in all sub directories.

The fix would probably be to either find this Apache configuration and change it - or possibly adjust the way that 'errors' are handled through the interface. I don't know. After 2 hours on this I decided to use a PHP script to emulate directory listing.

I almost did the same and resorted to a PHP script but sometimes you come so far and just have to find the problem :D

With the error document removed you can then do the usual custom vhost file in /var/www/vhosts/yourdomain.com/conf/vhost.conf containing:

Code:
<Directory "/var/www/vhosts/secretfiles.co.uk/httpdocs">
        Options +Indexes
</Directory>

And you will have Apache directory browsing working again. Just need to get this working with icons and I will be back in happy land:

Code:
<Directory "/var/www/vhosts/secretfiles.co.uk/httpdocs">
        Options +Indexes
        AddIcon /icons/wordicon.gif .doc .docx
</Directory>
 
Back
Top