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

Posted April 27, 2015 22.7k views

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/publichtml
sudo chown -R rami:rami /var/www/Mysite/public
sudo chmod -R 755 /var/www

Create Demo Pages for Each Virtual Host

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

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

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
DocumentRoot /var/www/Mysite/publichtml
ErrorLog ${APACHELOGDIR}/error.log
DIR}/access.log combined

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?


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.

Submit an Answer
2 answers

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

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