问题
我已经尝试并阅读了有关此主题的各种问题,但无法使其正常工作。我正在尝试使用虚拟主机来访问与 wamp 使用的默认 /www 不同的文件夹。但我不断收到错误消息;
Forbidden
You don't have permission to access / on this server.
我可以完美地访问本地主机和 phpmyadmin,但不能访问我创建的任何虚拟主机。
httpd-vhosts.conf
# Virtual Hosts
#
# Required modules: mod_log_config
Listen 80
<VirtualHost *:80>
ServerAdmin admin@localhost.com
DocumentRoot "C:\Program Files (x86)\2. Apps\Wamp\www"
ServerName localhost
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@localhost.com
DocumentRoot "C:\Users\Chris\Documents\CBull Files\Projects\Tests"
ServerName test.lo
ServerAlias test.lo
<directory "C:\Users\Chris\Documents\CBull Files\Projects\Tests">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>
主机
# Wamp Server Settings
127.0.0.1 localhost
127.0.0.1 test.lo
httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
谢谢