Centos7下Apache配置多站点

直接在下/etc/httpd/conf.d/myhosts.conf输入指令

例如:

  1. vi /etc/httpd/conf.d/myhosts.conf
  2. <VirtualHost *:80>
  3.    ServerName yangtzeu.simpleoj.cn
  4.    ServerAlias yangtzeu.simpleoj.cn www.yangtzeu.simpleoj.cn
  5.    DocumentRoot /var/www/html/yangtzeu
  6.    DirectoryIndex index.html index.php
  7. </VirtualHost>
  8. <VirtualHost *:80>
  9.    ServerName simpleoj.cn
  10.    ServerAlias simpleoj.cn www.simpleoj.cn
  11.    DocumentRoot /var/www/html
  12.    DirectoryIndex index.html index.php
  13. </VirtualHost>

 

未经允许不得转载:微信信息发源地 » Centos7下Apache配置多站点

赞 (0)
分享到:更多 ()

评论 0

评论前必须登录!

登陆 注册