Link to home
Start Free TrialLog in
Avatar of knfitz
knfitzFlag for United States of America

asked on

How to list what sites are running on an apache web server

I have no experience with apache. I am trying to confirm which server is a running a certain website. My servers are apache. How can I see a list of websites that are running on an apache server?
Avatar of E-Z-D
Flag of Belgium image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cd /path/to/httpd_config_file/
grep -i servername httpd.conf
grep -i serveralias httpd.conf

Your installation may have an "extras" directory.  If you, you'll need to also check the vhosts file there.
E_Z_D's link is a good one, at least for Ubuntu and Debian.  Apache2 on those systems use several directories to control what sites and mods are being used.  'sites-enabled' will tell you which 'virtual hosts' are supposed to be running.