首頁  >  問答  >  主體

web - ubuntu下apache2.4配置多站點問題

在apache2.4下配置瞭如下代碼文件
但是apache報錯
(另外網上教程說綁定host文件,我並不知道這是什麼東西。)

設定部分程式碼如下
apache2.conf
Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
NameVirtualHost smilencer.meServerName www.smilencer.me DocumentRoot "/var/www/wordpress" <Directory "/var/www/wordpress"> Options FollowSymLinks AllowOverride All Require all granted



ServerName www.whatare.me
DocumentRoot "/var/www/What_Are_You_Doing/map"

 Options FollowSymLinks 
 AllowOverride All 
 Require all granted 


NameVirtualHost whatare.me

mytest.conf

伊谢尔伦伊谢尔伦2734 天前595

全部回覆(1)我來回復

  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:15:27

    這裡給你一個參考,你可以用你自己的網域替換掉[YOUR_DOMAIN_NAME]

    <VirtualHost *:80>
        ServerAdmin admin@[YOUR_DOMAIN_NAME].com
        DocumentRoot "/var/www/dev/doc"
        ServerName [YOUR_DOMAIN_NAME].com
        ServerAlias [YOUR_DOMAIN_NAME].com
        ErrorLog logs/[YOUR_DOMAIN_NAME].com-error_log
    </VirtualHost>

    回覆
    0
  • 取消回覆