Plesk for Linux
kb: how-to
ABT: Group A
Applicable to:
- Plesk for Linux
Question
How to enable/disable directory browsing for a domain in Plesk for Linux?
Answer
Note: By default, directory listing is disabled for security reasons.
In the example below, directory listing is enabled for the shared directory (example.com/shared/). Change this directory to your own in the configuration below.
-
Go to Domains > example.com > Apache & nginx Settings.
-
Add the following configuration:
-
to the Additional nginx directives field:
CONFIG_TEXT: location /shared/ {
autoindex on;
} -
to the Additional directives for HTTP and Additional directives for HTTPS fields:
CONFIG_TEXT: <Location /shared/>
Options +Indexes
</Location>
-
-
Apply the changes.
To disable the directory browsing, remove the directives above.
Comments
4 comments
Cant use Location in .htaccess:
Error: /var/www/vhosts/domain.tld/httpdocs/.htaccess: <Location not allowed here, referer: https://domain.tld/
Hello Myhost
This isn't allowed by Apache design.
So the above fix...?
Myhost
My bad, I've not noticed this)
I will ask the article author to fix the article.
Thank you.
Please sign in to leave a comment.