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. 在應用配置文件 app.php 中找不到’route_check_cache’配置項2. html按鍵開關如何提交我想需要的值到數據庫3. mysql取模分表與分表4. gvim - 誰有vim里CSS的Indent文件, 能縮進@media里面的5. HTML 5輸入框只能輸入漢字、字母、數字、標點符號?正則如何寫?6. 跟著課件一模一樣的操作使用tp6,出現了錯誤7. PHP類屬性聲明?8. objective-c - ios 怎么實現微信聯系列表 最好是swift9. javascript - 請教如何獲取百度貼吧新增的兩個加密參數10. java - 安卓接入微信登錄,onCreate不會執行
