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

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog

记录生活,精彩一刻 - 错误

暂无文章

nginx下 配置typecho 只能访问主页,其他页面400 或502错误问题
Huo · 2021-11-23 · via 记录生活,精彩一刻 - 错误

问题描述:

在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