Perfect Server shows "It Works" when I go to my IP address

Discussion in 'HOWTO-Related Questions' started by jkrell, May 20, 2011.

  1. jkrell

    jkrell New Member

    Hi there!

    I followed the Ubuntu Perfect Server setup from the tutorials here. All my sites are working great. However, when I actually type in my IP, I get the default Apache "It Works!" page. I'd like to turn that off or, ideally, redirect to a different site. Any idea how to go about that?
     
  2. eyeoncomputers

    eyeoncomputers New Member

    You can do "/etc/init.d/httpd stop" to stop the service, then "chkconfig httpd off" to disable it from being started on bootup.

    OR

    You can modify the index.html in /var/www/html and add a redirect to send to another page using a meta tag

    HTML:
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">
    OR

    You can come up with an apache config that will redirect for you.
     
  3. jkrell

    jkrell New Member

    Well, I wouldn't want to stop httpd because then my web sites wouldn't work! I'm not sure why you'd even suggest that.

    I know how to redirect a web page; I just wasn't sure where the "It works!" page was located. And I don't have an "html" directory inside /var/www

    Coming up with an apache config that would redirect traffic sounds like what I want; I'll Google it and see what I can do but if anyone here's aware of a simple guide, please let me know.

    I'm still learning all this web server stuff... sorry.
     
  4. profm2

    profm2 New Member

    2 answers

    Ok, you type in HTTP://DOMAIN.COM ... and everything works correctly, I'm assuming.

    However, when you type in HTTP://1.2.3.4 ... you get the "It Works" default apache page.

    Short answer - it can't look up 1.2.3.4 in the server to resolve it to your website

    Longer answer - because of BIND, your server doesn't know how to look up 1.2.3.4 in its DNS tables, so if you type in DOMAIN.COM, the nameserver points to your machine, in which it resolves DOMAIN.COM to /var/www/clients/clientX/webX/web/index.html (or php if you prefer).

    The reason it cannot resolve 1.2.3.4 to DOMAIN.COM, is that ISPConfig can be configured for multi-domains. So if you had DOMAIN1.COM and DOMAIN2.com, they'd both point to your IP address, but on the server, be two different directories.

    In this case how would it resolve 1.2.3.4? To DOMAIN1.COM or DOMAIN2.COM?

    In fact, the default Apache2 has its root document directory at /var/www ... and if you look in there, there's a INDEX.HTML file sitting there.
     
    Last edited: May 22, 2011
  5. jkrell

    jkrell New Member

    Found it and have it redirecting to a site I chose. Thanks for the expalantion. It was very helpful.
     

Share This Page