53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /var/www/html/public;
|
|
index index.php;
|
|
|
|
charset utf-8;
|
|
|
|
client_max_body_size 20M;
|
|
|
|
real_ip_header X-Forwarded-For;
|
|
set_real_ip_from 0.0.0.0/0;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr warn;
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 256;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
|
location = /robots.txt { access_log off; log_not_found off; }
|
|
|
|
location ~* \.(jpg|jpeg|gif|png|css|js|ico|webp|tiff|ttf|svg)$ {
|
|
expires 5d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass app:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
location ~ /\. {
|
|
deny all;
|
|
log_not_found off;
|
|
}
|
|
}
|