配置Apache虚拟主机
配置Apache虚拟主机。这样就可以实现一个IP地址绑定多个域名。
其意义在于可以用一个IP地址绑定多个网站。这样做:
#httpd.conf
ServerName 网站1的域名,如example1.xxx.cn
DocumentRoot "网站1路径"
Options FollowSymLinks
AllowOverride None
Require all granted
ServerName 网站2的域名,如example2.xxx.cn
DocumentRoot "网站2路径"
Options FollowSymLinks
AllowOverride None
Require all granted
重启下Apache就OK了。
|