typecho 的 Nginx 的配置
日期: October 25, 2020 作者:网站维护
https://nginx.org/en/docs/http/ngx_http_core_module.html#location
typecho 后台提交数据无效,try_files $uri $uri/ /index.php?$args;
index.php 最后需要加上?$args,后台发文章,post都是提交给/index.php处理的,所以参数也要加上。
server {
listen 80;
listen [::]:80;
server_name www.bdtg.info;
root /根目录路径;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php(\/.*)*$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.0-fp m.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
}
广告内容为平台自动生成