lookingglass/docker/nginx/nginx.conf
Marc 33f675f5fb
Move root out of location context
We are also loading images, (like favicon.ico), these will also redirect to index.php.
Side effect, this causes the CSRF to be regenerated in the session.
2022-07-29 13:59:52 +02:00

50 lines
1.1 KiB
Nginx Configuration File

user nginx;
worker_processes 1;
error_log /dev/stderr warn;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout combined;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 100m;
server_tokens off;
gzip on;
open_file_cache max=100;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_buffering on;
fastcgi_buffer_size 1k;
fastcgi_buffers 128 1k;
fastcgi_max_temp_file_size 0;
gzip off;
}
}
}