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. javascript - 百度坐标,返回目标附近有哪些坐标2. javascript - 关于jsp中嵌入js代码的问题3. html - 急求,能否用flex或者高端点的CSS来布局这个图呢?不想用浮动或定位了4. PHP类中的$this5. angular.js - angularjs 百度统计怎么统计6. angular.js - angurlarJS的安卓的微信端中用加载ngCookies会出错的问题7. javascript - 关于fullpage.js的横向滚动控制8. python 正则表达式提取9. javascript - 有什么兼容性比较好的办法来判断浏览器窗口的类型?10. Python操作sqlserver是异步的吗?

网公网安备