Skip to content

Instantly share code, notes, and snippets.

@cuonghuynh
Last active October 2, 2018 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuonghuynh/6c8d9df66f4cbe738bb58ce27ea04265 to your computer and use it in GitHub Desktop.
Save cuonghuynh/6c8d9df66f4cbe738bb58ce27ea04265 to your computer and use it in GitHub Desktop.
Disable listing directory in browser

Open apache2 config, remove Indexes option

$ sudo vim /etc/apache2/apache2.conf

Change from

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment