CentOS 7----Apache基于域名的虚拟主机配置

Posted 这是一个很好的名字

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS 7----Apache基于域名的虚拟主机配置相关的知识,希望对你有一定的参考价值。

配置/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>
 









以上是关于CentOS 7----Apache基于域名的虚拟主机配置的主要内容,如果未能解决你的问题,请参考以下文章