Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th May 2011, 21:05
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default Perfect Server shows "It Works" when I go to my IP address

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?
Reply With Quote
Sponsored Links
  #2  
Old 21st May 2011, 07:19
eyeoncomputers eyeoncomputers is offline
Junior Member
 
Join Date: May 2011
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

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 Code:
<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.
__________________
Solaris ZFS How To
Reply With Quote
  #3  
Old 21st May 2011, 17:58
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default

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.
Reply With Quote
  #4  
Old 22nd May 2011, 20:23
profm2 profm2 is offline
Junior Member
 
Join Date: Mar 2011
Posts: 12
Thanks: 2
Thanked 2 Times in 2 Posts
Default 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 by profm2; 22nd May 2011 at 20:29. Reason: Found document location.
Reply With Quote
The Following User Says Thank You to profm2 For This Useful Post:
jkrell (22nd May 2011)
  #5  
Old 22nd May 2011, 20:54
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
 
Default

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

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig3 mail doesn't work pehden Installation/Configuration 20 9th December 2013 14:05
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 13:58
problem with upgrade to 2.2.34 brianetilley Installation/Configuration 14 11th November 2009 17:22
The Perfect Setup - Debian Etch (Debian 4.0) some trouble daniel80 HOWTO-Related Questions 26 1st February 2008 16:30
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 07:39.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.