##### Kapitel 7 - Virtuelle Hosts
### Vorbereitung
Require all granted
### IP-based VHost
DocumentRoot /usr/local/apache2/htdocs-ipbased.sv
ServerName ipbased.sv
CustomLog logs/ipbased-access.log combined
ErrorLog logs/ipbased-error.log
#Redirect / https://ipbased.sv/
### Name-based VHost
DocumentRoot /var/www/empty
ServerName 172.31.31.102
ErrorLog logs/102-error.log
DocumentRoot /usr/local/apache2/htdocs-firma1.sv
ServerName firma1.sv
ServerAlias *.firma1.sv
CustomLog logs/firma1-access.log combined
ErrorLog logs/firma1-error.log
DocumentRoot /usr/local/apache2/htdocs-firma2.sv
ServerName firma2.sv
ServerAlias *.firma2.sv
CustomLog logs/firma2-access.log combined
ErrorLog logs/firma2-error.log
### Massen-Hosting
LoadModule vhost_alias_module modules/mod_vhost_alias.so
UseCanonicalName off
LogFormat "%V %h %l %u %t \"%r\" %>s %b" vcommon
LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vcombined
VirtualDocumentRoot /usr/local/apache2/htdocs-mass/%-2.0.%-1.0
CustomLog logs/masshosting-access.log vcombined
ErrorLog logs/masshosting-error.log
##### Weiteres
### VHost auf 127.0.0.1:8001
Listen 127.0.0.1:8001
DocumentRoot /usr/local/apache2/htdocs-8001
CustomLog logs/8001-access.log combined
ErrorLog logs/8001-error.log
### Name-base VHosts zusätzlich auf Port 8002
Listen *:8002
#
# [...]
#