Apacheapachectl -S
按 IP 地址和端口列出所有启用的站点,包括 vhost 文件。
例如。
$ sudo apachectl -S
#VirtualHost configuration:
172.31.111.200:80 is a NameVirtualHost
default server foo.bananas.co.uk (/etc/apache2/sites-enabled/foo.bananas.co.uk:1)
port 80 namevhost foo.bananas.co.uk (/etc/apache2/sites-enabled/foo.bananas.co.uk:1)
172.31.111.200:443 is a NameVirtualHost
default server foo.bananas.co.uk (/etc/apache2/sites-enabled/foo.bananas.co.uk:9)
port 443 namevhost foo.bananas.co.uk (/etc/apache2/sites-enabled/foo.bananas.co.uk:9)
我如何使用 nginx 获取这些信息?