Jump to content

Extract all domain names (name servers) from apache httpd.conf


mskuzzy

Recommended Posts

Hi All

 

I need to extract (list) all the domains names from and apache installation for the server for which it is installed. I am very new to Apache so any help and suggestions would be highly appreciated. I only need all the domain names Eg. www.mydomain.com and if possible the IP Address. I assume I need to extract this from the httpd.conf file from some online reading. Would this be the name server value?

 

Thanks

mwskuzzy

Linux makes things very easy :)

 

cd /etc/apache2

#(or wherever apache configs are)

 

grep -Ri ServerName * > list_of_domainnames.txt

grep -Ri ServerAlias * >> list_of_domainnames.txt

 

 

That should do it.

 

Rgds,

Steve

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.