web - ubuntu下apache2.4配置多站點問題
問題描述
在apache2.4下配置了如下代碼文件但是apache報錯(另外網上教程說綁定host文件,我并不知道這是什么東西。。)
配置部分代碼如下apache2.confInclude the virtual host configurations:IncludeOptional sites-enabled/*.confNameVirtualHost smilencer.me<VirtualHost 138.68.12.160:80>
ServerName www.smilencer.meDocumentRoot '/var/www/wordpress' <Directory '/var/www/wordpress'> Options FollowSymLinks AllowOverride All Require all granted
</Directory> </VirtualHost> <VirtualHost 138.68.12.160:80>
ServerName www.whatare.meDocumentRoot '/var/www/What_Are_You_Doing/map'
<Directory '/var/www/What_Are_You_Doing/map'>
Options FollowSymLinks AllowOverride All Require all granted
</Directory> </VirtualHost>
NameVirtualHost whatare.me
mytest.conf
問題解答
回答1:這里給你一個參考,你可以用你自己的域名替換掉[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>
相關文章:
1. css3 - 手機網頁中用css寫1px的描邊,為什么需要加一句overflow:hidden才能真正顯示1px?2. mysql - 一個表和多個表是多對多的關系,該怎么設計3. Mysql && Redis 并發問題4. javascript - node服務端渲染的困惑5. php - 第三方支付平臺在很短時間內多次異步通知,訂單多次確認收款6. javascript - 百度echarts series數據更新問題7. python - type函數問題8. css3 - css before 中文亂碼?9. mysql新建字段時 timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00’ 報錯10. css - 求推薦幾款好用的移動端頁面布局調試工具呢?
