日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

wampserver 绑定域名 外部可以正常访问

發布時間:2025/4/9 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 wampserver 绑定域名 外部可以正常访问 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

wampserver使用的apache ?綁定都一樣

綁定的域名xuechao2010.gicp.net ?端口是8989

系統是win7 64位

1.綁定域名 端口 ?在apache上

D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf

請到apache目錄下查找

需要修改 搜索 httpd-v 基本就可以找到了 去掉前面的#號 開啟 虛擬主機設置

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

修改端口 # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # ServerName localhost:8989

 監聽端口修改

# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80Listen 0.0.0.0:8989 Listen [::0]:8989

 后面就是添加虛擬主機 ?實例參考 ?目錄權限沒有設置了 后面還需要在仔細寫下

D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

<VirtualHost *:8989>DocumentRoot "D:/wamp/www"ServerName xuechao2010.gicp.netErrorLog "logs/91hxorgError.log"CustomLog "logs/91hxorgCustom.log" common </VirtualHost>

  

然后就是在 路由器里面 添加端口映射 我用的TP-LINK ?左側面板 轉發規則---虛擬服務器 --添加新條目

PS : 端口映射這里先在CMD下查看當前IP 是否正確 我開始用的192.168.1.100后來發現換了到192.168.1.101了 映射前先查下 ipconfig /all

現象: 本地可以telnet localhost 8989 (通過)遠程 telnet 91hx.xicp.cn 8989 (不通)

 然后就是添加win7 防火墻 端口例外

端口UDP 8989 入站和出站規則 都寫上

同時保證apache http server 沒有被阻止

 

?

轉載于:https://www.cnblogs.com/xxx91hx/p/4568284.html

總結

以上是生活随笔為你收集整理的wampserver 绑定域名 外部可以正常访问的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。