我正在使用php編寫一個Web應用程序,但我不知道如何直接從本地訪問我的網站。Wamp的虛擬主機配置
我在配置Apache虛擬主機,但仍然沒有工作,
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/top10"
ServerName top10.com
<Directory "C:/wamp/www/top10" >
allow from all
order allow,deny
AllowOverride all
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
我還添加了相同的服務器名條目主機文件
當我嘗試訪問我收到以下錯誤
Not Found
The requested URL/was not found on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at top10.com Port 80
我想訪問我的網站作爲http://top10.com而不是http://localhost/top10。
能否請你幫我這個
可能重複http://stackoverflow.com/questions/15717739/wamp-server-virtual -hosts-configuration) – jlocker
我做了同樣的事情,但仍然無法訪問 –
您是否嘗試將別名添加到主機文件? – jlocker