2016-11-26 62 views
0

我正在使用WAMP 3.06。我在主持的网站“C:/ wamp64/WWW/webagenda”WAMP 3.06,是虚拟主机破坏的目录?

当我尝试访问远程使用“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> 

这里有什么不对吗?

回答

-1

如果将<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> 

编辑

我假设你要添加的非标准端口号的URL试图访问网站的时候?

http://cloudappoint.myvnc.com:8000 

当我添加了:8000我没有得到我得到一个离线页面,指出

The site you have requested is currently unavailable, 
please try back again later. 
+0

也许你忘了端口号添加到URL'错误:8000' – RiggsFolly