鍍金池/ 問答/PHP  HTML/ apache 虛擬主機問題?

apache 虛擬主機問題?

http.conf

Listen 8090
Include conf/extra/httpd-vhosts.conf 已經(jīng)開啟
LoadModule vhost_alias_module modules/mod_vhost_alias.so 已經(jīng)開啟
LoadModule authz_host_module modules/mod_authz_host.so 已經(jīng)開啟
DocumentRoot "E:/web"

<Directory "E:/web">

httpd-vhosts.conf

<VirtualHost *:80>

ServerName www.lyt7y.cn  
DocumentRoot "E:/web/myweb"  
ServerAlias www.lyt7y.cn  

</VirtualHost>

hosts

127.0.0.1 www.lyt7y.cn

localhost:8090 訪問正常。www.lyt7y.cn 無法訪問(www.lyt7y.cn 拒絕了我們的連接請求),

回答
編輯回答
愚念

1.可以ping下www.lyt7y.cn 看看是否有響應
2:如果沒有響應,可能是hosts沒有進行ip綁定,需要將域名綁定到hosts中

127.0.0.1 www.lyt7y.cn

3:如果綁定過了,可以檢查下系統(tǒng)代理

2017年11月8日 21:57
編輯回答
厭惡我

www.lyt7y.cn 你 host文件里做映射了嗎?

2018年3月3日 09:38
編輯回答
氕氘氚

兄dei,都ping不通你的域名呀

clipboard.png

  1. 試試http.conf 搜索require local替換成Require all granted
  2. apache監(jiān)聽的是8090端口,域名訪問的時候不是該加上端口號嗎?www.lyt7y.cn:8090
2018年6月30日 16:14