Setting Up Apache Virtual Hosts- I keep getting the Apache default page?

I keep getting the apache default page, here are my steps for a single site what am i doing wrong?

sudo apt-get update sudo apt-get install php5-gd libssh2-php

sudo mkdir -p /var/www/Mysite/public_html sudo chown -R rami:rami /var/www/Mysite/public_html sudo chmod -R 755 /var/www

Create Demo Pages for Each Virtual Host

nano /var/www/Mysite/public_html/index.html

<html> <head> <title>Welcome to!</title> </head> <body> <h1>Success! The virtual host is working!</h1> </body> </html>

Create New Virtual Host Files

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/Mysite.conf

sudo nano /etc/apache2/sites-available/photo.conf

<VirtualHost *:80> ServerAdmin My ServerName ServerAlias DocumentRoot /var/www/Mysite/public_html ErrorLog ${APACHELOGDIR}/error.log CustomLog ${APACHELOG_DIR}/access.log combined </VirtualHost>

Save and close the file.

Enable the New Virtual Host Files

sudo a2ensite photo.conf sudo service apache2 restart

Could it be my Dns/domain setup, do i have to add subdomain or something more complex, it’s set up just to point here and thats it?

Ultimately I’m trying to set 3 wordpress websites, prior to this i installed LAMP and set up the database’s for each following the How To Set Up Multiple WordPress Sites on a Single Ubuntu VPS. I stopped after the database was setup and followed this guide How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS to test if it would work but nothing so far.

Im not getting any errors and everything seemed fine, i don’t know what I’m missing?

Show comments

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.

really problem. no solution available for 10 errors i faced. what the problem I made.

This question was answered by @rami2:

Hi, I’ve since solved the issue and set up 3 websites on one droplet, i wrote a tutorial for the entire process which you may find helpful some things are missing from the digital ocean tutorials.


View the original comment