标签:style 权限 tor arc errorlog lin director httpd str
Linux配置虚拟主机后,只能访问到主页怎么办?
今天配置了lamp后,添加了一个虚拟主机,配置http.conf后,增加虚拟主机,测试访问发现只有域名下能访问,ljt.com但是域名下所有的都访问不到。
Httpd-vhost..conf
<VirtualHost *:80>
DocumentRoot "/usr/local/apache/htdocs/cyds"
ServerName cyds.ljt.com
Errorlog logs/cyds.ljt.com.err
CustomLog logs/cyds.ljt.com.access common
<Directory "/usr/local/apache/htdocs/cyds">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
查了半天资料:
少了权限问题:
最后我们需要在apache配置文件/opt/lampp/etc/httpd.conf中添加一下网站目录的访问权限。
<Directory "/opt/lampp/www/site1">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
配置lamp环境虚拟主机参考:
http://www.cnblogs.com/hi-bazinga/archive/2012/04/23/2466605.html
http://www.cnblogs.com/luoine/archive/2011/03/09/1978096.html
http://blog.csdn.net/misakaqunianxiatian/article/details/52328775
标签:style 权限 tor arc errorlog lin director httpd str
原文地址:http://www.cnblogs.com/lovebing/p/6762705.html