Update nginx.conf
Browse files- nginx.conf +6 -6
nginx.conf
CHANGED
|
@@ -8,19 +8,19 @@ server {
|
|
| 8 |
error_log /dev/stderr;
|
| 9 |
|
| 10 |
location / {
|
| 11 |
-
|
| 12 |
-
if (!-e $request_filename) {
|
| 13 |
-
rewrite ^/(.*)$ /index.php/$1 last;
|
| 14 |
-
}
|
| 15 |
}
|
| 16 |
|
| 17 |
location ~ \.php$ {
|
| 18 |
-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
| 19 |
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
| 20 |
fastcgi_index index.php;
|
| 21 |
include fastcgi_params;
|
| 22 |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
location ~ /\.(ht|env|git) {
|
|
|
|
| 8 |
error_log /dev/stderr;
|
| 9 |
|
| 10 |
location / {
|
| 11 |
+
try_files $uri $uri/ /index.php?$args;
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
location ~ \.php$ {
|
|
|
|
| 15 |
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
| 16 |
fastcgi_index index.php;
|
| 17 |
include fastcgi_params;
|
| 18 |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
| 19 |
+
# Extract original URI (without query string) from REQUEST_URI
|
| 20 |
+
if ($request_uri ~ ^([^?]*)) {
|
| 21 |
+
set $orig_path $1;
|
| 22 |
+
}
|
| 23 |
+
fastcgi_param ORIG_PATH_INFO $orig_path;
|
| 24 |
}
|
| 25 |
|
| 26 |
location ~ /\.(ht|env|git) {
|