Running several name-based web sites on a single IP address. https://httpd.apache.org/docs/2.2/en/vhosts/examples.html

Server configuration

# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example.com

# Other directives here

</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example.org

# Other directives here

</VirtualHost>
Where is http.conf?
/etc/apache2/httpd.conf
# Virtual hosts conf
Include /private/etc/apache2/extra/httpd-vhosts.conf
# Other conf
Include /private/etc/apache2/other/*.conf

Where is DocumentRoot?
/Library/WebServer/Documents/

Where is mod_perl.conf
/private/etc/apache2/other/mod_perl.conf

topic: macosx
first posted: 2016-08-26 17:28:30
last modified: 2016-08-26 19:06:23