Hi,
I am hosting two websites with the same IP addresses. I made the following configuration: website 2 (xyz.com) is online. However, website 1 (abc.com) is not online. When I ping both IP addresses, it shows request time out.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.abc.com
ServerAlias abc.comabc.com
DocumentRoot /www/domain
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.abc\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.) http://www.abc.com/$1 [L,R]
</VirtualHost>
<VirtualHost *:80>
ServerName www.xyz.com
ServerAlias xyz.comxyz.com
DocumentRoot /www/domain
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.xyz\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.) http://www.xyz.com/$1 [L,R]
</VirtualHost>
When I ping the IP addresses of websites, it shows Request timed out.
Ping statistics for x.x.x.x:
Pac kets: sent =4, Received=0, Lost=4<100% loss>
Will greatly appreciate your help.
Thank you very much.
It looks like what you’re trying to do is host two domains on your ISP’s account.
This is probably against your agreement with your host and will cause you to have your account terminated.
This is likely to open your computer to (easy) attack as you’re certainly not hardened against any kind of hack attack.
If you’re monitoring for hacker attacks, you certainly can’t do that 24/7/365!
Leave hosting to the professionals who know what they’re doing and have the $$$ to get the correct tools to enable them to do the job properly.
Now, having said that, I run a TEST server on my desktop with master copies of the files/databases on the production (hosted) server. This does not appear to be what you’re doing because
a. You’ve not mentioned your DNS daemon. On a PC emulating a server, that would be your (extensionless) hosts file while, on a production server, that’s handled by a daemon.
b. Although you didn’t say so, I believe your <VirtualHost> code is in your server’s equivalent of the WinDoze extras/httpd-vhosts.conf rather than the DNS. This is handled by a DNS daemon in a production environment. Are you on a hosted server or your own Linux box?
c. I got a chuckle out of both your domains sharing a DocumentRoot. Really? cPanel calls that a “parked domain.”
Perhaps we could provide better information if we knew what you were doing, i.e., hosted, type of hosting, Linux is apparent but … where’s your DNS? I’m sure you hid your IP address to prevent someone hacking but you do need to let us have some information (like it IS being withheld).