
這是我的 nginx conf 位置區塊:
location /foo {
alias /var/www/foo;
index index.php;
try_files $uri $uri/ /index.php;
location /foo/index.php {
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}
當我將資料發佈到 /foo 時,它不會出現在 index.php 中(該文件$_POST
為空)。
我試圖在這裡找到類似的問題,但它們都有重寫規則或更複雜的設定。
我如何簡單地讓 nginx 將所有內容傳遞到預設索引?
謝謝!