- 论坛徽章:
- 0
|
linux apache 虚拟主机配置如下
<VirtualHost 192.168.0.10:80>
ServerName 192.168.0.10:80
DocumentRoot "/var/www/html"
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 192.168.0.20:80>
ServerName 192.168.0.20
DocumentRoot "/wwwroot/html" # 这里改成/var/www/html2 就能访问
<Directory "/wwwroot/html"> # 这里改成/var/www/html2 就能访问
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
浏览器结果:
Forbidden
You don't have permission to access /index.html on this server.
/wwwroot/html 权限没问题啊, 换成/var/www/html2 就能访问.为什么呢?
|
|