Search code examples
apacheubuntuamazon-web-servicesamazon-ec2webserver

Apache2 still shows a list of files instead of my webpage ( Directoryindex adjusted )


I've recently launched ubuntu instance at AWS, with LAMP & Ajenti. Uploaded my files to var/www section, checked out Directoryidex ( index.html is present). But when I try to access my web page it gives me a list of files instead of running a page. Any ideas?


Solution

  • Make sure that both DocumentRoot and DirectoryIndex are set correctly in VirtualHosts and/or .htaccess. Also, you might want not anyone to see your file tree, use the following snippet to avoid that.

    <Directory /path/to/your/dir>
        Options -Indexes
    </Directory>