我已經安裝了WAMP 3.0.6與無法從本地網絡
- 的Apache 2.4.23
- PHP 7.0.10
- 的MySQL 5.7.14
然後,我在「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錯誤返回。
你是否也將虛擬主機名輸入到System HOST文件中? –
是的,我有。我試過使用127.0.0.1並指向本地主機,也嘗試了我的本地IP地址,並嘗試使用這些IP在虛擬主機中使用的「wordpress-test」。 我只能使用PC的名稱或「本地主機」從我的電腦訪問,但如果我使用PC的本地IP,則不能訪問。 – akafortes