配置/etc/hosts文件,192.168.1.209 對應的域名如下:
192.168.1.209 www.name1.com
編輯每個域名的配置文件:
<VirtualHost 192.168.1.209:80>
ServerName www.name1.com
DocumentRoot /var/www/html
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>