netmaker/backup2.nginx.conf
2021-07-28 02:23:20 +00:00

70 lines
2.8 KiB
Text

server {
listen 443;
listen [::]:443;
server_name dashboard.stage.netmaker.org; # The external URL
client_max_body_size 0;
ssl_certificate /etc/letsencrypt/live/stage.netmaker.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/stage.netmaker.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
# if you use a custom resolver to find your app, needed with swag proxy
# resolver 127.0.0.11 valid=30s;
set $upstream_app dashboard; # The internal URL
set $upstream_port 3000; # The internal Port
set $upstream_proto http2; # the protocol that is being used
proxy_pass $upstream_proto://$upstream_app:$upstream_port; # combine the set variables from above
}
}
server {
listen 443;
listen [::]:443;
server_name api.stage.netmaker.org; # The external URL
client_max_body_size 0;
underscores_in_headers on;
ssl_certificate /etc/letsencrypt/live/stage.netmaker.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/stage.netmaker.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
# if you use a custom resolver to find your app, needed with swag proxy
# resolver 127.0.0.11 valid=30s;
set $upstream_app netmaker; # The internal URL
set $upstream_port 8081; # The internal Port
set $upstream_proto http2; # the protocol that is being used
proxy_pass $upstream_proto://$upstream_app:$upstream_port; # combine the set variables from above
# Forces the header to be the one that is visible from the outside
proxy_set_header Host api.stage.netmaker.org; # Please cange to your URL
# Pass all headers through to the backend
proxy_pass_request_headers on;
}
}
server {
listen 80 http2;
server_name grpc.stage.netmaker.org
client_max_body_size 0;
underscores_in_headers on;
ssl_certificate /etc/letsencrypt/live/stage.netmaker.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/stage.netmaker.org/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.stage.netmaker.org; # Please change to your URL
# Pass all headers through to the backend
proxy_pass_request_headers on;
location / {
grpc_pass grpc://localhost:50051;
}
}