惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - builderman

运行abp install-libs的时候,提示"NPM is not installed"的原因及解决办法 nginx 基本操作 KeyCloak基础概念 用crontab定时分隔nginx日志文件 修改linux终端中当前用户的显示颜色 minikube使用笔记 ssh端口转发 kubectl proxy 让外部网络访问K8S service的ClusterIP 记录一下我在ubuntu下安装 minikube的过程 ssh ssh-keygen 私钥 docker vscode server docker network docker mysql8 phpmyadmin linux 压缩与解压缩 Ubuntu添加开机自动启动程序的方法 Linux基本命令集合 linux下使用supervisor启动.net core mvc website的配置 小修改,让mvc的验证锦上添点花(2) 小修改,让mvc的验证锦上添点花(1)
nginx 正向代理与反正代理的区别及简单配置
builderman · 2022-03-07 · via 博客园 - builderman
正向代理  反向代理

如果把局域网外的Internet想象成一个巨大的资源库,

则局域网中的客户端要访问Internet,

则需要通过代理服务器来访问,这种代理服务就称为正向代理

如果局域网向Internet提供资源服务,

让Internet上的其他客户端来访问局域网内的资源,

使它们必须通过一个代理服务器来进行访问,这种服务就称为反向代理。

正向代理和反向代理逻辑正好相反

正向代理隐藏的是客户端 ,服务端是明确的

反向代理是隐藏的服务端,客户端只知道一个代理服务器的入口,

并不知道真实的服务器在哪,

就好像拨打10086,10086(nginx)再将客户(客户端)转接给一个个客服(服务器)

 Sample:

    server {

        listen 8080;

        resolver 8.8.8.8;

        location / {

            proxy_pass http://$http_host$request_uri;

        }

    }


 设置nginx代理服务,一般是配置到一个server块中。

注意,在该server块中,不要出现server_name指令,

即不要设置虚拟主机的名称和IP

proxy_pass: 你想你去哪就带你去哪

 Sample:
    server {
        listen 9000;
        server_name first.xx.com;
        
        location / {
            proxy_pass https://192.168.1.100;
        }
    }

proxy_pass: 别BB,你要的东西我找人给你,你别管就是了

使用:

在浏览器中设置代理服务:“Internet选项” -> “连接” -> “局域网设置” -> “代理服务器”,

然后设置如下:

 

 不做任何配置,

浏览器直接访问http://first.xx.com

对访问来说是透明的

转自:https://blog.csdn.net/u012796139/article/details/50067951