标签:error color usr iter ext .com vim vhost data
[root@localhost ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/data/www"
ServerName www.test.com
ErrorLog "logs/test.com_error_log"
CustomLog "logs/test.com_access_log" combined
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^.*/tmp/.* [NC] # 这里是相对目录,即不能访问网站根目录下的 tmp 目录
RewriteRule .* - [F]
</IfModule>
</VirtualHost>
[root@localhost ~]# /usr/local/apache2/bin/apachectl -t
[root@localhost ~]# /usr/local/apache2/bin/apachectl graceful
标签:error color usr iter ext .com vim vhost data
原文地址:http://www.cnblogs.com/pzk7788/p/7040932.html