Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I put in url bar ns1.mydomain.com (my nameserver), it serves default Apache home page. or in another words it responded to http request. Is this behavior normal? If not how can I hinder it?

share|improve this question

closed as not a real question by mgorven, symcbean, mailq, Ward, Khaled Feb 27 '13 at 7:42

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

up vote 0 down vote accepted

Assuming that you want apache running on your server, and you have multiple IPs on the server, edit your apache config to listen only on the desired IP(s). It is probably listening on 0.0.0.0 (all IPs) now.

Assuming you don't want apache, uninstall it.

Assuming you do want apache and you only have 1 IP on the server, then people will always be able to hit that IP on port 80, so you will need to do as Hagen suggested above and reconfigure apache to only server content for configured hostnames.

share|improve this answer

Even if you do want to run a webserver on the same box, you may want to reconfigure Apache to serve content only for configured hostnames. Of course, this would merely replace the default page with a http error (because the host name is transmitted only after the connection is already established), but may be cleaer and slightly better equipped against attacks/exploits of the webserver.

share|improve this answer
    
That's a good suggestion. –  dsh Feb 27 '13 at 2:35
    
@hagen, Thank you –  tenzin Feb 27 '13 at 20:14

No it's not normal - it demonstrates that the system administrator has not taken the time to configure the system properly - and given the security implications of a badly configured HTTP server or DNS server this is really bad news for all of us (but good news for anyone looking for a system to abuse).

How you "hinder" it is to learn how to configure your server properly and apply that knowledge - but an answer to that goes way beyond the scope of a post here.

share|improve this answer

It's normal enough in a variety of configurations. For example, as I recall, RedHat would install apache by default. Debian and Ubuntu do not install apache by default.

Some choices for changing this:

  • uninstall apache from the machine (I recommend this if you don't intend it to be a web server)
  • configure the local firewall to drop incoming packets for TCP and UDP ports on which you don't intend to provide any service (I recommend this as well)
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.