-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
70 lines (59 loc) · 2.05 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
error_log /var/log/nginx/error.log warn;
events {
worker_connections 1024;
}
http {
log_format access '[$time_local] $status $request ($body_bytes_sent bytes) - $http_x_forwarded_for';
access_log /var/log/nginx/access.log access;
default_type application/octet-stream;
gzip on;
include /etc/nginx/mime.types;
keepalive_timeout 65;
sendfile on;
server {
# access_log /var/log/nginx/host.access.log access;
add_header Content-Security-Policy "default-src 'self'; font-src 'self' https://fonts.gstatic.com; img-src 'self' https://cscdn.net; style-src 'self' https://fonts.googleapis.com; report-uri https://cscdn.report-uri.com/r/d/csp/enforce";
add_header Expect-CT "max-age=0, report-uri=https://cscdn.report-uri.com/r/d/ct/reportOnly";
add_header Feature-Policy "speaker 'self'";
add_header Referrer-Policy "no-referrer-when-downgrade";
add_header Server "Charles Stover";
add_header X-Frame-Options "DENY";
add_header X-Xss-Protection "1; mode=block";
# charset koi8-r;
etag on;
listen 80 default_server;
root /var/www;
location / {
access_log on;
add_header Cache-Control "must-revalidate, no-cache, no-store, post-check=0, pre-check=0";
add_header Expires "Thu, 01 Jan 1970 00:00:01 GMT";
index index.html;
proxy_cache_bypass $http_pragma;
proxy_cache_revalidate on;
try_files $uri /index.html;
}
location /service-worker.js {
access_log off;
add_header Cache-Control "must-revalidate, no-cache, no-store, post-check=0, pre-check=0";
add_header Expires "Thu, 01 Jan 1970 00:00:01 GMT";
proxy_cache_bypass $http_pragma;
proxy_cache_revalidate on;
try_files $uri =404;
}
location ~* \.(?:css|gif|ico|jpg|js|txt)$ {
access_log on;
add_header Cache-Control "public";
expires max;
try_files $uri =404;
}
}
server {
listen 80;
return 301 https://acealters.com$request_uri;
server_name www.acealters.com;
}
# tcp_nopush on;
}
pid /var/run/nginx.pid;
user nginx;
worker_processes 1;