-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.conf
41 lines (31 loc) · 1.03 KB
/
server.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
server {
listen 80;
# 👇 Accepts requests from both localhost (for local dev)
# and the cloud URL (for prod/staging). This allows reusing
# the same config in all environments.
server_name localhost pfas-app-dev.renci.unc.edu;
location / {
return 301 https://$server_name$request_uri;
add_header Cache-Control "no-cache";
}
# access_log /var/log/nginx/host.access.log main;
}
server {
listen 443 ssl;
# 👇 Same as above — accepts localhost for local dev, and
# cloud-hosted URL for prod/staging. Don't forget certs
# are faked locally and real ones are mounted in prod.
server_name localhost www.pfas-app-dev.renci.unc.edu;
ssl_certificate /ssl.cer;
ssl_certificate_key /ssl.key;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}