You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

server {
listen <LISTEN_PORT>;
root <WEBROOT>;
index index.php;
charset utf-8;
set $path_info "";
location ~ /include {
deny all;
return 403;
}
if ($request_uri ~ "^/api(/[^\?]+)") {
set $path_info $1;
}
location /api {
try_files $uri $uri/ /api/http.php?$query_string;
}
if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
set $path_info $1;
}
location ~ ^/scp/ajax.php/.*$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
if ($request_uri ~ "^/ajax.php(/[^\?]+)") {
set $path_info $1;
}
location ~ ^/ajax.php/.*$ {
try_files $uri $uri/ /ajax.php?$query_string;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ \.php$ {
include /etc/nginx/nginx.conf.d/php-fpm.conf;
try_files $uri = 404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param LARA_ENV local; # Environment variable for Laravel
fastcgi_param PATH_INFO $path_info;
}
### Don't edit past here
include /etc/nginx/nginx.conf.d/site_optimization.conf;
include /etc/nginx/nginx.conf.d/exploit_protection.conf;
}