-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
214 lines (178 loc) · 6.62 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_proxied any;
gzip_min_length 1000;
gzip_types application/json text/plain text/css application/javascript
text/javascript image/svg+xml application/x-javascript
font/woff font/woff2;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location /404.html {
# No 'internal;' directive here
}
error_page 404 /404.html;
}
# Settings for a TLS enabled server.
#
server {
listen 443 ssl http2 ;
listen [::]:443 ssl http2 ;
server_name hazmapper.tacc.utexas.edu; # managed by Certbot
root /usr/share/nginx/html;
ssl_certificate /etc/letsencrypt/live/hazmapper.tacc.utexas.edu/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hazmapper.tacc.utexas.edu/privkey.pem; # managed by Certbot
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
# Maintenance page for complete site (Uncomment when in maitenance mode)
#location / {
# root /etc/nginx;
# index maintenance.html;
#}
location /maintenance {
root /etc/nginx;
index maintenance.html;
}
# images used by maitenance/404 page
location /images {
alias /etc/nginx/images;
}
location = / {
# redirect to prod
rewrite ^ /hazmapper permanent;
}
location /hazmapper/ {
proxy_pass http://prod.geoapi-services.tacc.utexas.edu:83;
rewrite /hazmapper/(.*) /$1 break;
}
location /hazmapper-react/ {
proxy_pass http://prod.geoapi-services.tacc.utexas.edu:82;
rewrite /hazmapper-react/(.*) /$1 break;
}
location /staging {
rewrite /staging/(.*) /$1 break;
proxy_pass http://staging.geoapi-services.tacc.utexas.edu:83;
proxy_redirect off;
proxy_set_header Host $host;
}
location /staging-react {
rewrite /staging-react/(.*) /$1 break;
proxy_pass http://staging.geoapi-services.tacc.utexas.edu:82;
proxy_redirect off;
proxy_set_header Host $host;
}
location /dev {
rewrite /dev/(.*) /$1 break;
proxy_pass http://dev.geoapi-services.tacc.utexas.edu:83;
proxy_redirect off;
proxy_set_header Host $host;
}
location /dev-react {
rewrite /dev-react/(.*) /$1 break;
proxy_pass http://dev.geoapi-services.tacc.utexas.edu:82;
proxy_redirect off;
proxy_set_header Host $host;
}
location /exp {
rewrite /exp/(.*) /$1 break;
proxy_pass http://experimental.geoapi-services.tacc.utexas.edu:83;
proxy_redirect off;
proxy_set_header Host $host;
}
location /exp-react {
rewrite /exp-react/(.*) /$1 break;
proxy_pass http://experimental.geoapi-services.tacc.utexas.edu:82;
proxy_redirect off;
proxy_set_header Host $host;
}
location /taggit/ {
rewrite /taggit/(.*) /$1 break;
# was: proxy_pass http://c006.rodeo.tacc.utexas.edu:32391;
proxy_pass http://prod.geoapi-services.tacc.utexas.edu:81;
proxy_redirect off;
proxy_set_header Host $host;
}
location /taggit-staging {
rewrite /taggit-staging/(.*) /$1 break;
# was proxy_pass http://c006.rodeo.tacc.utexas.edu:30072;
proxy_pass http://staging.geoapi-services.tacc.utexas.edu:81;
proxy_redirect off;
proxy_set_header Host $host;
}
location /taggit-dev {
rewrite /taggit-dev/(.*) /$1 break;
proxy_pass http://dev.geoapi-services.tacc.utexas.edu:81;
proxy_redirect off;
proxy_set_header Host $host;
}
location /taggit-exp {
rewrite /taggit-exp/(.*) /$1 break;
proxy_pass http://experimental.geoapi-services.tacc.utexas.edu:81;
proxy_redirect off;
proxy_set_header Host $host;
}
location /geoapi {
rewrite /geoapi/(.*) /$1 break;
proxy_pass https://prod.geoapi-services.tacc.utexas.edu;
proxy_redirect off;
proxy_set_header Host $host;
}
location /geoapi-staging {
rewrite /geoapi-staging/(.*) /$1 break;
proxy_pass https://staging.geoapi-services.tacc.utexas.edu;
proxy_redirect off;
proxy_set_header Host $host;
}
location /geoapi-dev {
rewrite /geoapi-dev/(.*) /$1 break;
proxy_pass https://dev.geoapi-services.tacc.utexas.edu;
proxy_redirect off;
proxy_set_header Host $host;
}
location /geoapi-experimental {
rewrite /geoapi-experimental/(.*) /$1 break;
proxy_pass https://experimental.geoapi-services.tacc.utexas.edu;
proxy_redirect off;
proxy_set_header Host $host;
}
location /404.html {
# No 'internal;' directive here
}
error_page 404 /404.html;
}
}