-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
52 lines (40 loc) · 1.29 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
server {
server_name pkaindextest.com www.pkaindextest.com;
if ($host = pkaindextest.com) {
return 301 https://www.$host$request_uri;
}
proxy_read_timeout 5;
proxy_connect_timeout 5;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
location / {
add_header X-Proxy-Cache $upstream_cache_status;
add_header Cache-Control "public, max-age=31536000";
proxy_cache_bypass $http_upgrade;
proxy_pass http://0.0.0.0:5678;
}
location ~ (/v1/api|/robots.txt|/sitemap.xml) {
proxy_pass http://0.0.0.0:1234;
}
listen 443 ssl;
ssl_certificate /Users/zak/Selfsigned/pkaindextest.pem;
ssl_certificate_key /Users/zak/Selfsigned/pkaindextest.key;
}
server {
if ($host = www.pkaindextest.com) {
return 301 https://$host$request_uri;
}
if ($host = pkaindextest.com) {
return 301 https://$host$request_uri;
}
server_name pkaindextest.com www.pkaindextest.com;
listen 80;
return 404;
}