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

推荐订阅源

The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
爱范儿
爱范儿
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
S
SegmentFault 最新的问题
S
Schneier on Security
V
Vulnerabilities – Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Latest news
Latest news
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
L
LINUX DO - 热门话题
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
SecWiki News
SecWiki News
H
Hacker News: Front Page
aimingoo的专栏
aimingoo的专栏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Threatpost
罗磊的独立博客
L
LangChain Blog
The Last Watchdog
The Last Watchdog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
K
Kaspersky official blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
N
News | PayPal Newsroom
美团技术团队
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
T
The Blog of Author Tim Ferriss
N
Netflix TechBlog - Medium
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone

Nginx - 分类 - cywhat's blog

nginx解决多个端口映射80的配置 web服务 访问Linux中的静态文件
nginx配置实现ip访问指定URL
cywhat · 2021-04-02 · via Nginx - 分类 - cywhat's blog

我的需求是这样的,nginx+uwsgi启动的web服务,访问域名XX.CN之后,nginx报错404,我需要实现的是访问XX.CN,自动映射到XX.CN/login 因为我server是80端口,所以不需要加端口即可访问

1.nginx配置如下:

1
vim nginx.conf

在你启动的server中加入如下配置

1
2
3
if ( $request_uri = "/" ) {
    rewrite "/" http://XX.CN/login break;
  }

2.然后现在去访问XX.CN 就会映射到 XX.CN/login

3.大功告成!!!

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏