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

推荐订阅源

量子位
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

两双筷子

Seven Player:Windows上播放115网盘视频的增强工具 CDN 盗刷也是被我遇上了 多用户 PassKey 认证插件 博客五年 解析到本地127的神奇域名 Typecho 多吉云上传插件 极简 Docker 入门笔记 SQLite + zstd:定时任务日志压缩优化实践 离线授权码设计思路 海南环岛2:中线+东线 Typecho 垃圾评论过滤插件
1Panel 部署 FastAdmin 管理端访问 302 解决方案
两双筷子 · 2025-12-28 · via 两双筷子

最近使用 1Panel 面板部署 FastAdmin 项目用于测试,站点的伪静态选择 thinkphp,在部署完成后发现用户端可以正常访问,而管理端则会无限制重定向到 login/index,最终提示 “重定向次数过多...” 如下图所示:

69512629b7d35.png

经过排查 发现问题出现在 1Panel 自带的 fastcgi-php.conf 上这个文件上,如图 21 行:

6951265f7e3d7.png

解决方案是注释掉这一行,然后使用 fastadmin 官方推荐的 fastcgi 配置,代码如下:

location ~ [^/]\.php(/|$) {
        fastcgi_pass 127.0.0.1:9000; 
        # include fastcgi-php.conf;  # 注释掉这一行或者直接复制我的示例代码
        include fastcgi_params; 
        fastcgi_index index.php; 
        fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
        fastcgi_param PATH_INFO $fastcgi_path_info; 
        fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    }

保存修改的配置后,fastadmin 管理端入口即可正常访问:

695126aa44428.png

使用版本为 1Panel 2.0.16, OpenResty 版本为 1.27.1.2-2-3-focal