Debugging Virtual Host Setups


You can invoke the httpd binary with the -S option, as shown in Listing 5.5, and Apache will parse the configuration file. After processing all of the virtual host related information, it will present you with information about each configured virtual host and default host values. This is a very handy tool for debugging complex virtual host setups.

Listing 5.5. Checking the Virtual Host Configuration

# httpd -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:*                    is a NameVirtualHost          default server example.com (/usr/local/www/conf/httpd.conf:1055)          port * namevhost example.com (/usr/local/www/conf/httpd.conf:1055)          port * namevhost example.org (/usr/local/www/conf/httpd.conf:1082)          port * namevhost example.net (/usr/local/www/conf/httpd.conf:1094) Syntax Ok




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net