: How to fix separate virtual hosts serving intermingled content? I tried to search Google for one of my domains. I'm hosting multiple different websites on a VPS account, they are obviously sharing
I tried to search Google for one of my domains. I'm hosting multiple different websites on a VPS account, they are obviously sharing the same IP address.
To my surprise, the search results on one of my domains returned a few suggestions with ANOTHER domain (of my clients website), but after the ".com" part it has a prefix to MY personal project domain. Like this: mydomain.com/about/coffee.html. I do a search on mydomain.com and I get some of the results with myclientsdomain.com/about/coffee.html, and it opens MY domains content, but with my clients domain being in front.
How has this happened? They are in separate "vhosts" folders, everything is set up correctly (or so I think) and now this. Maybe there are some issues with DNS records I'm not aware of?
More posts by @Jennifer507
1 Comments
Sorted by latest first Latest Oldest Best
Is seem you did not specify yet where the content of myclientsdomain.com is so the default content is served on the server. You have to set up a VirtualHost for myclientsdomain.com.
Virtualhost setup should be something like the following:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
To stay on the safe path and not to fall into the same pitfall again you could set up a VirtualHost setting for you own domain too and set up just a simple parking page or redirect page on /var/www
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.