php/docker/nginx-app.conf

44 lines
1017 B
Plaintext

server {
listen 80 default_server;
listen [::]:80 default_server;
access_log off;
client_max_body_size 64m;
error_log /dev/stdout info;
fastcgi_buffering off;
fastcgi_request_buffering off;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/javascript;
index index.php index.html;
root /var/www/html/public;
server_tokens off;
set $my_https "off";
if ($http_x_forwarded_proto = "https") {
set $my_https "on";
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param HTTPS $my_https;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $host;
fastcgi_read_timeout 600s;
fastcgi_send_timeout 600s;
}
}