mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-15 09:34:23 +08:00
60 lines
2.1 KiB
Text
60 lines
2.1 KiB
Text
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name dashboard.stage.netmaker.org; # The external URL
|
|
client_max_body_size 0;
|
|
|
|
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 http; # the protocol that is being used
|
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port; # combine the set variables from above
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name api.stage.netmaker.org; # The external URL
|
|
client_max_body_size 0;
|
|
underscores_in_headers on;
|
|
|
|
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 http; # 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;
|
|
|
|
|
|
# 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;
|
|
}
|
|
}
|