35 lines
1020 B
Plaintext
35 lines
1020 B
Plaintext
server {
|
|
listen 80;
|
|
|
|
index index.php index.html;
|
|
root /var/www/html/public;
|
|
|
|
# Log to Docker (avoid writing to container FS)
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr warn;
|
|
|
|
client_max_body_size 500M;
|
|
|
|
# Add X-Forwarded-Proto header
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header Host $host;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location ~ [^/]\.php(/|$) {
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
fastcgi_param HTTP_PROXY "";
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_param PHP_SELF $fastcgi_script_name$fastcgi_path_info;
|
|
fastcgi_param SERVER_NAME $host;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
}
|
|
}
|