1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00
api/nginx_test.conf

35 lines
719 B
Text

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
client_max_body_size 200m;
if ($request_method = POST ) {
rewrite /upload /do_upload last;
break;
}
location /do_upload {
fastcgi_pass api:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /app/src/public/upload.php;
}
index index.php;
try_files $uri /index.php?$query_string /index.php;
location /static/ {
alias /demos/;
}
location ~ ^(.+?\.php)(/.*)?$ {
fastcgi_param PATH_INFO $2;
fastcgi_pass api:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /app/src/public/index.php;
include fastcgi_params;
}
}