Report this

What is the reason for this report?

var/www/index.html not showing up - just standard "It works!" page - how to solve?

Posted on December 29, 2013

Hi,

So I’ve got my server set up with LAMP, but I’ve go one problem. If I go to mydomain.com the standard “It works!” page shows up. I’ve placed my own index.html in var/www/ and if I go to mydomain.com/index.html it shows up. Naturally, I want mydomain.com to point to /var/www/index.html.

How do I fix this?

Thanks in advance,

  • W


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!

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.

I have done this, but it still isn’t working. Is there a setting in apache2 conf that i also need to do? php works from the command line, but in the browser, I can see the code. I have fixed this problem before but cannot figure out what’s wrong this time.

I used the LAMP server image that you offer so I didn’t configure it myself. Is there an easy way to change the root directory? And yes, I deleted the index.html which was already in var/www before I added mine. <br> <br>Thanks, <br> <br>- W

Did you restart Apache, afterwards? If not, execute: <br><pre>sudo service apache2 restart</pre> <br>* I don’t work for DigitalOcean.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.