mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-11 10:10:46 +08:00
46 lines
1.6 KiB
Text
46 lines
1.6 KiB
Text
|
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;
|
||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||
|
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;
|
||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://127.0.0.1:8081;
|
||
|
proxy_set_header Host api.NETMAKER_BASE_DOMAIN;
|
||
|
proxy_pass_request_headers on;
|
||
|
}
|
||
|
}
|
||
|
server {
|
||
|
listen 1443 ssl http2;
|
||
|
server_name grpc.NETMAKER_BASE_DOMAIN
|
||
|
ssl_certificate /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/fullchain.pem;
|
||
|
ssl_certificate_key /etc/letsencrypt/live/NETMAKER_BASE_DOMAIN/privkey.pem;
|
||
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||
|
|
||
|
# Forces the header to be the one that is visible from the outside
|
||
|
proxy_set_header Host api.NETMAKER_BASE_DOMAIN; # Please change to your URL
|
||
|
|
||
|
# Pass all headers through to the backend
|
||
|
proxy_pass_request_headers on;
|
||
|
|
||
|
location / {
|
||
|
grpc_pass grpc://127.0.0.1:50051;
|
||
|
}
|
||
|
}
|