• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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