I have a server called dad.co.uk. This used to work in a very standard way. My daughter wanted me to host her website for free and so her site girl.co.uk now lives in
/home/daughter/public_html
and mine in
/home/father/public_html
and almost everything works.
In order to get to my site you have to do www.dad.co.uk and if you put just dad.co.uk you get redirected to daughter.co.uk. Why is it not going to my .../father/public_html
?
I want anything asking for dad.co.uk to try dad.co.uk and anything to girl.co.uk to go to her site
I have these virtual hosts defined (I have removed pointy brackets to get this system to display)
VirtualHost www.daughter.co.uk:80
DocumentRoot /home/rachel/public_html/daughter
Directory /home/rachel/public_html/daughter
allow from all
Options None
Require all granted
/Directory
ErrorLog /var/log/apache2/error.log
LogLevel warn
/VirtualHost
VirtualHost www.dad.co.uk:80
DocumentRoot /home/father/public_html
Directory "/home/father/public_html"
allow from all
Options None
Require all granted
/Directory
/VirtualHost
VirtualHost dad.co.uk:80
DocumentRoot /home/father/public_html
Directory /home/father/public_html
allow from all
Options None
Require all granted
/Directory
/VirtualHost
Nothing appears in the error_log
<VirtualHost *:80>
andServerName
directive inside. – pa4080 Sep 27 '18 at 16:35