2016-11-26 28 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