29 行
841 B
Nginx Configuration File
29 行
841 B
Nginx Configuration File
server {
|
|
listen 8080 default_server;
|
|
server_name fx.routersys.com;
|
|
server_tokens off;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
absolute_redirect off;
|
|
error_page 404 /404.html;
|
|
|
|
add_header Cache-Control "public, max-age=600, no-transform" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header Content-Security-Policy "default-src 'none'; style-src 'self'; img-src 'self' data:; font-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'" always;
|
|
|
|
if ($request_method !~ ^(GET|HEAD)$) {
|
|
return 405 "Method Not Allowed\n";
|
|
}
|
|
|
|
location / {
|
|
ssi on;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location /rate/ {
|
|
internal;
|
|
alias /tmp/rate/;
|
|
}
|
|
}
|