2017-08-08 122 views
0

我已經安裝了WAMP 3.0.6無法從本地網絡

  • 的Apache 2.4.23
  • PHP 7.0.10
  • 的MySQL 5.7.14
瀏覽WAMP

然後,我在「www/wp/wp_test /」中安裝了Wordpress 4.8,一切正常,我可以使用地址「localhos t/wp/wp_test /「

現在我想從同一本地網絡上的其他計算機訪問該網站。

所以我編輯的httpd-vhosts.conf和改變:

<VirtualHost *:80> 
ServerName localhost 
DocumentRoot D:/wamp/www 
<Directory "D:/wamp/www/"> 
    Options +Indexes +Includes +FollowSymLinks +MultiViews 
    AllowOverride All 
    Require local  
</Directory> 

<VirtualHost *:80> 
ServerName localhost 
DocumentRoot D:/wamp/www 
<Directory "D:/wamp/www/"> 
    Options +Indexes +Includes +FollowSymLinks +MultiViews 
    AllowOverride All 
    Require all granted 
</Directory> 

這並沒有工作,所以我改回了默認並添加一個新條目指向wordpress文件夾

<VirtualHost *:80> 
ServerName wordpress-test 
DocumentRoot "d:/wamp/www/wp/wp_test" 
<Directory "d:/wamp/www/wp/wp_test/"> 
    Options +Indexes +Includes +FollowSymLinks +MultiViews 
    AllowOverride All 
    Require all granted 
</Directory> 

我仍然無法從任何其它計算機訪問該網站在網絡上。 防火牆在我的電腦上完全關閉(WAMP正在運行)。

P.S. :我注意到,從我的電腦我可以使用我的電腦的主機名訪問該網站,但是當我嘗試使用我的本地IP時,我得到一個404錯誤返回。

+0

你是否也將虛擬主機名輸入到System HOST文件中? –

+0

是的,我有。我試過使用127.0.0.1並指向本地主機,也嘗試了我的本地IP地址,並嘗試使用這些IP在虛擬主機中使用的「wordpress-test」。 我只能使用PC的名稱或「本地主機」從我的電腦訪問,但如果我使用PC的本地IP,則不能訪問。 – akafortes

回答

0

經過許多閃光之後,我設法讓它工作。 我用

WAMP Tools -> "Use a port other than 80"

,改變了端口8082 出於某種原因,它只是沒有在端口80上運行,甚至以爲我什麼都沒有乳寧在該端口上(IIS採空,Skype公司被關閉等) 。

P.S .:在附註中,我必須從設置中更改wordpress url,並添加PCs IP而不是「localhost」,否則主題將無法在遠程PC上加載。 我從這篇文章中發現了這個: Wordpress will only fully load on localhost