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. docker鏡像push報錯2. 關docker hub上有些鏡像的tag被標記““This image has vulnerabilities””3. html5 - datatables 加載不出來數據。4. Docker for Mac 創建的dnsmasq容器連不上/不工作的問題5. node.js - mongodb查找子對象的名稱為某個值的對象的方法6. docker 下面創建的IMAGE 他們的 ID 一樣?這個是怎么回事????7. 運行python程序時出現“應用程序發生異常”的內存錯誤?8. html5和Flash對抗是什么情況?9. 測試自動化html元素選擇器元素ID或DataAttribute [關閉]10. 前端 - @media query 使用出現的問題?

網公網安備