Files
zcli-playground/cdn/nginx.conf
T
2026-02-08 10:25:39 +01:00

32 lines
861 B
Nginx Configuration File

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www;
location ^~ /.git {
deny all;
return 404;
}
location / {
try_files $uri $uri/ /index.html;
}
location /static/ {
try_files $uri $uri/ =404;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' '*' always;
add_header 'Access-Control-Allow-Headers' '*' always;
add_header 'Access-Control-Expose-Headers' '*' always;
if ($request_method = 'OPTIONS') {
return 204;
}
}
access_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=info default_short;
error_log syslog:server=unix:/dev/log,facility=local1,tag=nginx,severity=error;
}