ubuntu - How can I list the current Apache 2 virtual hosts from the command line? - Server Fault

Ask questions Research chat →

https://serverfault.com/questions/742352/how-can-i-list-the-current-apache-2-virtual-hosts-from-the-command-line · scraped

deploy terminal

Attachments

Scraped Content

— 69 words · 2026-02-14 03:20:26 UTC ·

Excerpt

I didn't found official documentation about it. The command apache2ctl -S check site-enabled*.conf + httpd.conf files and show you if the syntax is correct and the list of virtual host (and some more informations). But It doesn't check if virtualhosts are running, you can try to stop your Apache and launch again the command, the result will be the same. So apache2ctl -S result is based on configuration files.
I didn't found official documentation about it. The command apache2ctl -S check site-enabled*.conf + httpd.conf files and show you if the syntax is correct and the list of virtual host (and some more informations). But It doesn't check if virtualhosts are running, you can try to stop your Apache and launch again the command, the result will be the same. So apache2ctl -S result is based on configuration files.

Visibility

Visible to everyone

Reading Status

Related Bookmarks

My Note


Saved!

Annotations

Export as Markdown
+ Annotate selection

Add Annotation