WAMP 3.06,虚拟主机中的目录是否已损坏? [英] WAMP 3.06, is Directory into Virtual Hosts broken?
问题描述
我正在使用WAMP 3.06.我有一个托管在"c:/wamp64/www/webagenda"的网站
I am using WAMP 3.06. I have a web site hosted in "c:/wamp64/www/webagenda"
当我尝试使用" http://cloudappoint.myvnc.com 远程访问网站时,我得到:
When I try to access the site remotely using "http://cloudappoint.myvnc.com", I get:
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>
从我的评论中可以看到,如果我取消对下几行的评论,问题就结束了:
As you can see from my comments, if I 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>
请问这是怎么了?
推荐答案
如果将<Directory>
块移出<VirtualHost>
块会导致允许访问,则可以合理地假设<VirtualHost>
定义.
If moving the <Directory>
block out of the <VirtualHost>
block causes access to be allowed then it is a fair assumption that there is something wrong with the <VirtualHost>
definition.
我可以建议您尝试在定义中尝试更改
Can I suggest that you try this change in your definition
<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>
编辑
我假设您在尝试访问站点时将非标准端口号添加到url中吗?
I assume you are adding the non standard port number to the url when trying to access the site?
http://cloudappoint.myvnc.com:8000
当我添加:8000时,我没有得到错误,我得到一个脱机页面,显示
When I add the :8000 I do not get the error I get an offline page saying
The site you have requested is currently unavailable,
please try back again later.
这篇关于WAMP 3.06,虚拟主机中的目录是否已损坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!