Ubuntu 14.04.5 x64 Apache - Showing Index Of/ instead of index.html?

Good day, I’ve set up my server online over DigitalOcean, I followed their guides on how to set up an Ubuntu 14.04.x x64 server, setting up a LAMP stack, and installing phpMyAdmin. Everything is working fine, the shows the apache setup page. However, when I uploaded my new index.html (located at /var/www/html/index.html) file (I renamed the default one to index-default.html) and then refreshed my site, instead of showing my site, it shows Index Of/. I tried and it works. It’s just a bit of a hassle to have the user type in and I know it can work with just I opened up FileZilla to check if this may be caused by the difference of the permissions and ownership, and they were initially different. I updated the permissions and ownership and now they have the same sets.

The permission is -rwxrwxr-x and then the Owner/Group has been set to www-data www-data and now I’m just confused as to how to proceed with this.

Basically I want the site to show my index.html just by going to

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Fixed it.

I ran sudo nano /etc/apache2/mods-enabled/dir.conf

And then I saw that it didn’t say index.html. It had index.php twice.

It now reads

<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.php index.xhtml index.htm