SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Making website online

    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.com *abc.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.com *xyz.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.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,672
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    n5,

    It looks like what you're trying to do is host two domains on your ISP's account.

    1. This is probably against your agreement with your host and will cause you to have your account terminated.

    2. This is likely to open your computer to (easy) attack as you're certainly not hardened against any kind of hack attack.

    3. 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).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  3. #3
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    358
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Ping doesn't have anything to do with apache or websites. You need to verify your network, firewall and dns settings are correct
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •