From 76258159f7475ccf042b2e22336d4cae92bc8658 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Wed, 28 Jul 2021 03:19:20 +0000 Subject: [PATCH] adding nginx templates --- backup.nginx.conf | 60 ------------------ backup2.nginx.conf | 70 --------------------- netclient/local/.dns.go.swp | Bin 12288 -> 0 bytes nginx/netmaker-nginx-dns.conf | 96 +++++++++++++++++++++++++++++ nginx/netmaker-nginx-template.conf | 45 ++++++++++++++ 5 files changed, 141 insertions(+), 130 deletions(-) delete mode 100644 backup.nginx.conf delete mode 100644 backup2.nginx.conf delete mode 100644 netclient/local/.dns.go.swp create mode 100644 nginx/netmaker-nginx-dns.conf create mode 100644 nginx/netmaker-nginx-template.conf diff --git a/backup.nginx.conf b/backup.nginx.conf deleted file mode 100644 index ac65e57e..00000000 --- a/backup.nginx.conf +++ /dev/null @@ -1,60 +0,0 @@ -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; - } - } diff --git a/backup2.nginx.conf b/backup2.nginx.conf deleted file mode 100644 index 12119074..00000000 --- a/backup2.nginx.conf +++ /dev/null @@ -1,70 +0,0 @@ -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; - } - } diff --git a/netclient/local/.dns.go.swp b/netclient/local/.dns.go.swp deleted file mode 100644 index 0a35ff78ec768ac96c2512c962d4c95331f4d5c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2!He8f9LHZ^V-O*z#R!W=dx=ji_^amoYyY7x@(3@Osc7iAr zQhSjK{K)Ib#Ow0;kx^FP&dBH^0c|Y3}sSBer92vji*wOTZGa1S|nd zz!I(CN(2AYHJonq{3=u_wer~{pWUVs|V3FtWV1a$Xl^Z^CXGW7jZjC~1Rg65## zo@6Y7UWa~ZF!l{Jg8n?o*bmSK^gQ$}#`XpD8T2l+3#~#+kQw(Yklic+OTZGa1T2Ai z0{g7dh=opLNg|FJ9oY8&RWrF@`kC^IhS^LHW{XtM-Hb!2Bk7>4g@;u0-IcA@TI;oC zT8(2BlaPT*r53U1P@GB`${xicQPB+%=!o!{9dSBKVb>3Y^oIibd|YD=5)t1J=w@Q4 zt_-_|!2D&BVMMoQzU_L`+(ws4+!TR(MGc3(>^Qu%$(zLC6h+~)Nfm?cMyf}tcIut( zlZX=WAG}qOAI3HjS{t?<(e=|vpNmzh1u1C=yR_0)vBnG(SD}*EyPfc^ni$Xfd+pX3*PmCl`qs!#LN>=9rH}!)zA;+|0Q1S^-$8Y5}u9h*!uybclcR+ z6uYP5!68^{aaIRZVk{pml1kGE$N2Qtr5)+FBSBi3m6|QxHJNBXimIW3SV5E!p3)R& zZXLFgtKC18XC23!-*O%f>q-qaecgW`9Tr$Ol>zOHI=&WHTiZ^N5|n7fWe;JIkt~mk zbjzz2Oax(Iw~_Z{E>~i`NV8%_Gl=eP9BQ#W?#JO}C>;n0t7NSDZ|$rlHH)%rX_+RN`)ognTuOgu^|2X6@yj21<5$)11D(vbnk1y87OD ze|Kx6wf>?{5e#UrFLWQo5`ypX{gkBb>}Jy9rY>Amo28;(r+rI{q-=WXfUpjVrluhtw^a}h zk@aEZZVA6Lg>t?^w}m##v$9As|CPm88ssYR%nOkhZaAJM&KjP_d!g>9Z8uOuujAuQ w-s^ikbuJl+J