1. 目录/etc/httpd/conf.d下新建vhosts.conf文件,内容如下
Listen 80 <VirtualHost *:80> ServerName xxx.com DocumentRoot "/www" DirectoryIndex index.html index.php <Directory "/www"> Options -Indexes +FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>
2.注释/etc/httpd/conf/httpd.conf文件中的
Listen 80
3.重启Apache
/bin/systemctl restart httpd.service
本文链接:https://jeff.xin/post/86.html
--EOF--
发表于 2018-01-29 ,并被添加「 Apache 」标签 。
Comments
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。