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,
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
