我正在使用WAMP 3.06。 我有一个网站在“c:/ wamp64 / www / webagenda”
当我尝试使用“ http://cloudappoint.myvnc.com ”远程访问站点时,我得到:
Forbidden You don't have permission to access /webagenda on this server. Apache/2.4.23 (Win64) PHP/5.6.25 Server at agenda.myvnc.com Port 8000
我的虚拟主机文件是:
# Virtual Hosts <VirtualHost *:8000> ServerName localhost DocumentRoot c:/wamp64/www <Directory "c:/wamp64/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost> #if I uncomment the next lines the problem is over #<Directory "c:/wamp64/www/webagenda"> #Options Indexes FollowSymLinks Includes ExecCGI #DirectoryIndex index.php #AllowOverride None #Require all granted #</Directory> <VirtualHost *:8000> ServerName cloudappoint ServerAlias cloudappoint.myvnc.com DocumentRoot c:/wamp64/www/webagenda ErrorLog "logs/agenda-error.log" CustomLog "logs/agenda-access.log" common <Directory "c:/wamp64/www/webagenda/"> Options +Indexes +FollowSymLinks +MultiViews DirectoryIndex index.php AllowOverride All Require all granted </Directory> </VirtualHost>
正如你可以从我的评论中看到的,如果我取消下一行的注释,问题就结束了:
<Directory "c:/wamp64/www/webagenda"> Options Indexes FollowSymLinks Includes ExecCGI DirectoryIndex index.php AllowOverride None Require all granted </Directory>
这里有什么不对吗?
如果将<Directory>
块移出<VirtualHost>
块导致访问被允许,那么这是一个公平的假设,即<VirtualHost>
定义有问题。
我可以建议你在你的定义中尝试这个改变吗?
<VirtualHost *:8000> serverName cloudappoint.myvnc.com <--change serverAlias www.cloudappoint.myvnc.com <--change DocumentRoot c:/wamp64/www/webagenda ErrorLog "logs/agenda-error.log" CustomLog "logs/agenda-access.log" common <Directory "c:/wamp64/www/webagenda/"> Options +Indexes +FollowSymLinks +MultiViews DirectoryIndex index.php AllowOverride All Require all granted </Directory> </VirtualHost>
编辑
我假设你试图访问该网站时将非标准端口号添加到网址?
http://cloudappoint.myvnc.com:8000
当我添加:8000我没有得到错误,我得到一个脱机页面说
The site you have requested is currently unavailable, please try back again later.