2013-03-26 70 views
1

問題WAMP權限的Windows 8

我曾嘗試和讀取所有種類的關於這一主題的問題,但不能得到這個工作。我正嘗試使用虛擬主機訪問與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 [email protected] 
    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 [email protected] 
    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 

感謝

+0

當出現錯誤時,您嘗試訪問什麼路徑?它是'http:// localhost /'還是別的? – 2013-04-01 17:23:10

+0

與此設置我可以訪問'localhost'和'phpmyadmin',但不'test.lo' – ChrisBull 2013-04-01 20:26:48

+0

您是否以管理員身份登錄? – 2013-04-01 20:40:06

回答

1

感謝大家的投入,有兩個主要的問題

  1. 我安裝WAMP到這是嵌套在一個文件夾中誰的名字在這麼c:/folder/folder with a space/wamp/有一個空間,因爲我已經被告知在一個文件夾是不好的做法,如果有人知道爲什麼請告訴。

  2. 的是與互聯網協議,IPv6的就是問題,所以解決這個問題,你需要確保WAMP只使用IPv4,裏面httpd.conf找到Listen 80並更改爲Listen 0.0.0.0:80。再次我不確定這是什麼,如果有人知道請在下面發帖。

我希望這可以幫助其他人卡住。

0

嘗試更換以下模塊:

<VirtualHost test.lo:80> 
    ServerAdmin [email protected] 
    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> 
</VirtualHost> 

我已經只有一個變化:<VirtualHost *:80>替換<VirtualHost test.lo:80>

注意:您最後缺少</VirtualHost>

+0

謝謝,雖然沒有運氣 – ChrisBull 2013-04-03 09:55:55