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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
宝玉的分享
宝玉的分享
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
博客园 - 【当耐特】
小众软件
小众软件
博客园 - Franky
S
SegmentFault 最新的问题
WordPress大学
WordPress大学
雷峰网
雷峰网
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
Last Week in AI
Last Week in AI
博客园_首页
月光博客
月光博客
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
Webroot Blog
Webroot Blog
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
云风的 BLOG
云风的 BLOG
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Docker
The Last Watchdog
The Last Watchdog
有赞技术团队
有赞技术团队
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
DataBreaches.Net
S
Security @ Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs
Y
Y Combinator Blog
O
OpenAI News
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
K
Kaspersky official blog
Cloudbric
Cloudbric

记录生活,精彩一刻 - 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