![Forrest logo](/images/logo.png)
apachectl:hosts:list
List all Apache virtual hosts
$ apachectl -S
try on your machine
The command apachectl -S
is used to display the virtual host configuration details for an Apache HTTP server.
When executed, this command provides a list of all the virtual hosts that are configured on the server, along with their associated information such as server names, document root directories, port numbers, and SSL/TLS certificates.
The output of apachectl -S
usually includes the following details for each virtual host:
- The virtual host's number (in the order they were read from the configuration files).
- The IP address and port number on which the virtual host listens.
- The server name(s) associated with the virtual host.
- The document root directory of the virtual host.
- Any aliases or alternate names for the virtual host.
- The SSL/TLS certificate details (if the virtual host is configured for secure connections).
This command is useful because it provides a convenient way to verify the virtual host configuration and can help in troubleshooting issues related to misconfigured or conflicting settings among virtual hosts on an Apache server.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.
Questions that are answered by this command:
- How to list all apache2 vhosts?