[Docker] Fix nginx sample config

This commit is contained in:
Alex Thomassen 2020-04-02 15:52:45 +02:00
parent fd17441e91
commit c33f7974e4
Signed by: Alex
GPG Key ID: 10BD786B5F6FF5DE

View File

@ -7,8 +7,9 @@ server {
# Comment this line if not using HTTPS. # Comment this line if not using HTTPS.
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
try_files $uri $uri/ /index.php?$query_string; # Uncomment these two lines if not using HTTPS.
gzip_static on; # try_files $uri $uri/ /index.php?$query_string;
# gzip_static on;
} }
location ~ \.php$ { location ~ \.php$ {
@ -39,19 +40,23 @@ server {
server_tokens off; server_tokens off;
include ssl_params; ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff"; add_header X-Content-Type-Options "nosniff";
index index.html index.htm; index index.php index.html index.htm;
charset utf-8; charset utf-8;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /var/www/public;
location / { location / {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php?$query_string;