-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_default.txt
executable file
·48 lines (33 loc) · 1.17 KB
/
nginx_default.txt
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
server {
listen 80;
server_name commonproject.com;
return 301 https://www.$server_name$request_uri;
}
server {
listen 443 ssl;
server_name commonproject.com;
ssl on;
ssl_certificate /root/commonproject.com.chained.crt;
ssl_certificate_key /root/commonproject.com.key;
sendfile off;
expires -1;
location /static/ {
alias /var/www/commonproject/static/;
# expires 300d;
# add_header Pragma public;
# add_header Cache-Control "public";
# try_files $uri =404;
if ($scheme = http) {
return 301 https://www.$server_name$request_uri;
}
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_redirect http://www.commonproject.com/ https://www.commonproject.com;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}