What domain names are served by a host?

Posted by pjmorse on Server Fault See other posts from Server Fault or by pjmorse
Published on 2011-06-20T14:39:20Z Indexed on 2011/06/20 16:25 UTC
Read the original article Hit count: 186

Filed under:
|

For a set of VPSes operated by my company, I'd like to get a list of domain names hosted by each. The list of names has grown in an ad-hoc way for a few years. Is there a simple way to query the Apache and/or Nginx configurations to see what domains the server answers to on port 80?

It is safe to assume (a) that I have sudo on these systems, and (b) they aren't using wildcards, although a solution which acknowledged that a wildcard was in use would be useful too if it also provided a list of explicit domains.

© Server Fault or respective owner

Related posts about apache

Related posts about nginx