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

推荐订阅源

量子位
S
Securelist
MyScale Blog
MyScale Blog
Jina AI
Jina AI
罗磊的独立博客
The Cloudflare Blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
雷峰网
雷峰网
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
博客园 - 聂微东
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
Attack and Defense Labs
Attack and Defense Labs
博客园_首页
Latest news
Latest news
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
D
Docker
Webroot Blog
Webroot Blog
N
Netflix TechBlog - Medium
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog
Recent Announcements
Recent Announcements
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Security Latest
Security Latest
V2EX - 技术
V2EX - 技术
N
News | PayPal Newsroom
Microsoft Security Blog
Microsoft Security Blog

Nginx - 标签 - cywhat's blog

nginx解决多个端口映射80的配置 web服务 访问Linux中的静态文件 Python+virtualenv+Django+nginx+uwsgi+centos7部署web应用
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.大功告成!!!

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏