So, what I want to do is host two sites from the same server (and IP). I found out that the way to do that is through virtual hosts and I got it working for the first site, but for some reason it won't work for the second one.
I have enabled virtual hosts from the httpd.conf file and edited the etc/extra/httpd-vhosts.conf file.
The two sites are
http://quarantinebroadcast.com/
http://erasingsummer.com/
Here is my virtual hosts file
- Code: Select all
<VirtualHost *:80>
ServerAdmin xjimdim@gmail.com
ServerName quarantinebroadcast.com
ServerAlias www.quarantinebroadcast.com
DocumentRoot /opt/lampp/htdocs/quarantine
ErrorLog "logs/dummy-host.quarantinebroadcast.com-error_log"
CustomLog "logs/dummy-host.quarantinebroadcast.com-access_log" common
<Directory /opt/lampp/htdocs/quarantine>
Options +Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin xjimdim@gmail.com
ServerName erasingsummer.com
ServerAlias www.erasingsummer.com
DocumentRoot /opt/lampp/htdocs/erasingsummer
ErrorLog "logs/dummy-host.erasingsummer.com-error_log"
CustomLog "logs/dummy-host.erasingsummer.com-access_log" common
<Directory /opt/lampp/htdocs/erasingsummer>
Options +Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
For some reason the second site points to htdocs (where i have put a 'coming soon' index.html file) and not to the erasingsummer folder (where i have a whole wordpress site setup)
I am hosting this in a hetzner cloud debian server and I access it through ssh.
Both domain names point to the same IP address (A records)