- Apache
- Nginx
- Docker
- Docker compose
- ....
Quick Type Keyword > Search > Copy Config > Enjoy it!
Example: An Apache Virtual Host Configuration file
**Description: **
Config virtual host to redirect different request source (ip-base, domain-name base ) to relevant destination
Scope: simple config
Tested environment : Ubuntu 14.04 lts, apache 2.4
Config:
# vi /usr/local/apache2/sites-available/vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin admin@webmaster.com
DocumentRoot "/var/www/ex1"
ServerName example_1.com
ServerAlias www.example_1.com
ErrorLog "/var/log/apache2/example_1_error_log"
CustomLog "/var/log/apache2/example_1_access_log" common
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/ex2"
ServerName example_2.com
ServerAlias www.example_2.com
ErrorLog "/var/log/apache2/example_2_error_log"
CustomLog "/var/log/apache2/example_2_access_log" common
</VirtualHost>
**Source: **
Extra infomation: