File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # Setting up relay server
2+
3+ A relay server is a thin public server on cloud provider, which routes traffic back to another server (probably under tailscale without public IP).
4+
5+ Modify the IP in nginx.conf and setup this relay stack on the public server.
6+
7+ On the real server machine, start up the stack.
Original file line number Diff line number Diff line change 1+ # Use postgres/example user/password credentials
2+ version : " 3.5"
3+
4+ services :
5+ nginx :
6+ image : nginx:1.15-alpine
7+ restart : always
8+ ports :
9+ - " 80:80"
10+ - " 443:443"
11+ volumes :
12+ - ./nginx:/etc/nginx/conf.d
13+ - /etc/letsencrypt:/etc/letsencrypt
14+ - /var/lib/letsencrypt:/var/lib/letsencrypt
15+
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ listen [::]:80 ;
4+ server_name relay.codepod.io;
5+ return 301 https://$host$request_uri ;
6+ # location / {
7+ # proxy_pass http://100.90.127.27;
8+ # }
9+ }
10+
11+ server {
12+ listen 443 ssl http2;
13+ listen [::]:443 ssl http2;
14+ server_name relay.codepod.io;
15+
16+ server_tokens off;
17+
18+ ssl_certificate /etc/letsencrypt/live/relay.codepod.io/fullchain.pem;
19+ ssl_certificate_key /etc/letsencrypt/live/relay.codepod.io/privkey.pem;
20+
21+ location / {
22+ proxy_pass https://100.90.127.27 ;
23+ proxy_http_version 1.1;
24+ proxy_set_header Upgrade $http_upgrade ;
25+ proxy_set_header Connection "upgrade" ;
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments