netmaker/nginx/netmaker-nginx-template.conf

35 lines
1.1 KiB
Text
Raw Normal View History

2021-08-10 07:09:32 +08:00
server {
listen 80;
server_name *.NETMAKER_BASE_DOMAIN;
return 301 https://$host$request_uri;
}
2021-07-28 11:19:20 +08:00
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name dashboard.NETMAKER_BASE_DOMAIN;
ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem;
2021-07-29 02:13:37 +08:00
#include /etc/letsencrypt/options-ssl-nginx.conf;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
2021-07-28 11:19:20 +08:00
location / {
proxy_pass http://127.0.0.1:8082;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name api.NETMAKER_BASE_DOMAIN;
ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem;
2021-07-29 02:13:37 +08:00
#include /etc/letsencrypt/options-ssl-nginx.conf;
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
2021-07-28 11:19:20 +08:00
location / {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host api.NETMAKER_BASE_DOMAIN;
proxy_pass_request_headers on;
}
}