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

推荐订阅源

N
Netflix TechBlog - Medium
C
Cisco Blogs
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
P
Privacy International News Feed
T
Threatpost
小众软件
小众软件
Latest news
Latest news
T
Threat Research - Cisco Blogs
腾讯CDC
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
NISL@THU
NISL@THU
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
The Exploit Database - CXSecurity.com
有赞技术团队
有赞技术团队
T
Tenable Blog
Cisco Talos Blog
Cisco Talos Blog
博客园 - 【当耐特】
Project Zero
Project Zero
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
G
GRAHAM CLULEY
I
InfoQ
V
V2EX
T
Tailwind CSS Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
Cloudbric
Cloudbric
G
Google Developers Blog
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
博客园 - Franky
Martin Fowler
Martin Fowler
罗磊的独立博客
博客园_首页
PCI Perspectives
PCI Perspectives
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
C
Cybersecurity and Infrastructure Security Agency CISA
S
Secure Thoughts
月光博客
月光博客
The Cloudflare Blog
Google Online Security Blog
Google Online Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

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.大功告成!!!

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏