内容简介:发表于 2019-05-26 10:41:43 by月小升内网穿透的一个重要的作用就是在互联网上可以任意机器访问本地电脑的web服务
发表于 2019-05-26 10:41:43 by月小升
- frp内网穿透简介 (2019 年 5 月 25 日)
内网穿透的一个重要的作用就是在互联网上可以任意机器访问本地电脑的web服务
下面举例子用我的测试域名test.java-er.com 进行穿透
服务器上 frp s.ini文件增加vhost_http_port=82
[common] bind_port = 7000 vhost_http_port = 82 #端口自己喜好来定
客户端机器 frpc.ini文件增加节点[web]
[common] server_addr = 47.95.XX.XX #服务器IP server_port = 7000 [web] type = http local_port = 80 #本地http服务端口 custom_domains = test.java-er.com #服务器的域名
本地客户端机器apache配置文件端口为80,但是域名为test.java-er.com
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/Users/ge/ge/web/php/ge/javaer/h5"
ServerName test.java-er.com
# ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
<Directory "/Users/ge/ge/web/php/ge/javaer/h5">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
最终访问的地址不是80,是通过了服务器的test.java-er.com:82穿透到本地http的80端口,所以外网访问地址为test.java-er.com:82
我在本地放一个文件index.php
<?php echo '<meta charset="UTF-8">'; echo '我是月小升本地机器的 php 文件index.php, 访问我的地址test.java-er.com:82'; ?>
访问效果展示
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Beginning Google Maps API 3
Gabriel Svennerberg / Apress / 2010-07-27 / $39.99
This book is about the next generation of the Google Maps API. It will provide the reader with the skills and knowledge necessary to incorporate Google Maps v3 on web pages in both desktop and mobile ......一起来看看 《Beginning Google Maps API 3》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
RGB HSV 转换
RGB HSV 互转工具