要升级 cms,我有一个 php 文件,它是一个 phar 文件
(https://www.cmsmadesimple.org/downloads/cmsms/)
我把它放在我网站的根目录
访问该文件时,会在 url 的末尾添加一个 index.php 像这样:
https://xx.domain.be/cmsms-2.2.12-install.php
变得
https://xx.domain.be/cmsms-2.2.12-install.php/index.php
但是 nginx 给我发了一个错误:没有指定输入文件。
我必须为此网址添加配置,但我不知道是什么
配置 nginx:
server {
listen 443 ssl;
server_name xxx.domain.be;
root /var/www/sites/xxx;
index index.html index.php;
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
}
谢谢