Multiple Sites on Multiple Hostnames
Example to setup 2 hosts
Setup Virtual Host
www
- http://www.example.comdocs
- http://docs.example.com
Setup docs
Edit a docs.conf in /etc/apache2/sites-available
vim /etc/apache2/sites-available/docs.conf
Example:
<VirtualHost *:80>
ServerName docs.example.com
ServerAdmin webmaster@localhost
# The root document
DocumentRoot /var/www/docs
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>