标签:pre doc override logs sts server rect root options
编辑vhosts文件:/alidata/server/httpd-2.4.10/conf/extra/httpd-vhosts.conf
<VirtualHost *:80> <Location /> Order deny,allow Deny from all </Location> </VirtualHost> <VirtualHost *:80> DocumentRoot /alidata/www/abc ServerName abc.com ServerAlias www.abc.com <Directory "/alidata/www/abc"> Options FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> ErrorLog "/alidata/log/httpd/abc-error.log" CustomLog "/alidata/log/httpd/abc.log" common </VirtualHost>
注意两点:
1. 如果通过服务器ip进行访问,则默认会进入第一个web目录“abc”
2. 必须在最开始的位置,设置web根目录(www)的访问权限,否则很不安全
;
标签:pre doc override logs sts server rect root options
原文地址:http://www.cnblogs.com/upup2015/p/apache.html