博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
wampserver 绑定域名 外部可以正常访问
阅读量:4441 次
发布时间:2019-06-07

本文共 1500 字,大约阅读时间需要 5 分钟。

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 
# 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:8989Listen [::0]:8989

 后面就是添加虚拟主机  实例参考  目录权限没有设置了 后面还需要在仔细写下

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

DocumentRoot "D:/wamp/www" ServerName xuechao2010.gicp.net ErrorLog "logs/91hxorgError.log" CustomLog "logs/91hxorgCustom.log" common

  

然后就是在 路由器里面 添加端口映射 我用的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

你可能感兴趣的文章
iOS正确的自定义View方式
查看>>
nginx修改php.ini生效:php-fpm重启与nginx加载配置文件
查看>>
ubuntu下基于sqlite3后台的php环境的搭建
查看>>
Qt 静态库与共享库(动态库)共享配置的一个小办法
查看>>
linux_cacti 配置之 安装snmp 服务
查看>>
201407-至今
查看>>
c# 应用事务
查看>>
优化杭州某著名电子商务网站高并发千万级大型数据库经验之- SQL语句优化(转)...
查看>>
字符串的全排列
查看>>
DtCms.Model.Article.cs
查看>>
chapter02 svm对手写体数字的数码图像进行识别
查看>>
python编码问题 decode与encode
查看>>
hihocoder 1582 : Territorial Dispute (计算几何)(2017 北京网络赛E)
查看>>
files list file for package 'xxx' is missing final newline
查看>>
大数据——zookeeper分布式集群管理工具的学习与使用
查看>>
学习JAVA所需的东西
查看>>
dom4j api 详解--XPath 节点详解
查看>>
java正则表达式基础知识(转)
查看>>
使用babel
查看>>
怎么画流程图(转)
查看>>