Httpd 使用ip可以訪問,localhost和127.0.0.1不能訪問


解決方法:打開/etc/httpd/conf目錄下的httpd.conf文件,

加入
Listen 127.0.0.1:81

加入後:

Listen xxx.xxx.xxx.xxx:81

Listen 127.0.0.1:81

其中xxx.xxx.xxx.xxx是我的ip

這樣通過ip、localhost、127.0.0.1都可以訪問了



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章