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

推荐订阅源

量子位
云风的 BLOG
云风的 BLOG
The Cloudflare Blog
Cisco Talos Blog
Cisco Talos Blog
The Last Watchdog
The Last Watchdog
G
Google Developers Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LINUX DO - 最新话题
S
Secure Thoughts
E
Exploit-DB.com RSS Feed
博客园_首页
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Comments on: Blog
Simon Willison's Weblog
Simon Willison's Weblog
博客园 - 聂微东
Schneier on Security
Schneier on Security
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Privacy International News Feed
SecWiki News
SecWiki News
小众软件
小众软件
雷峰网
雷峰网
AWS News Blog
AWS News Blog
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
D
DataBreaches.Net
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX - 技术
N
News | PayPal Newsroom
S
Schneier on Security
The Register - Security
The Register - Security
V
V2EX
Recorded Future
Recorded Future
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
IT之家
IT之家
Engineering at Meta
Engineering at Meta
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
L
LINUX DO - 热门话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
Hacker News: Ask HN
Hacker News: Ask HN
MyScale Blog
MyScale Blog
D
Docker
Webroot Blog
Webroot Blog
博客园 - 叶小钗
Cloudbric
Cloudbric
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
Cyberwarzone
Cyberwarzone

记录生活,精彩一刻 - nginx

宝塔Nginx免费防火墙拦截发布的文章的解决办法
nginx下 配置typecho 只能访问主页,其他页面400 或502错误问题
Huo · 2021-11-23 · via 记录生活,精彩一刻 - nginx

问题描述:

在nginx的服务环境下,安装好typecho后,发现只能主页,或者不带?query参数页才能正常访问,其它页面都报错。

分析:

应该是nginx的伪静态设置问题。

nginx设置方法:

        server {
        listen 81;
        root    /usr/share/nginx/typecho;
        index   index.html index.htm index.php;
        include /etc/nginx/default.d/*.conf;

        location ~ .*\.php(\/.*)*$ {
                #fastcgi_split_path_info ^(.+\.php)(/.*)$;
                #设置监听端口
                fastcgi_pass    127.0.0.1:9000;
                #设置nginx的默认首页文件,和上面二选一,可删除
                fastcgi_index   index.php;
                if (!-e $request_filename){
                        rewrite ^(.*)$ /index.php?q=$1 last;
                        break;
                }

                #设置脚本文件请求路径
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
                #fastcgi_param  SCRIPT_NAME     $real_script_name;
                #fastcgi_param  PATH_INFO       $path_info;
                #引入FastCGI配置文件
                include fastcgi_params;
                include fastcgi.conf;
                #fastcgi_intercept_errors on;
        }
}

主要是添加下图红色款内这个:

请输入图片描述

版权声明:本文为kimiyang123原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/kimiyang123/article/details/106982980