-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
The setup:
192,168.2.6: Wok System (ubuntu 18.04)
192,168.2.15: nginx reverse proxy System (ubuntu 18.04)
What's the plan
I want to reverse proxy wok on another machine.
Is this even possible?
Why
I want to reverse proxy wok on another machine so i can host multipul applications on 1 ip
What i tried so far
I removed the ufw package on the nginx proxy machine and the wok machine
I also tryed to run the original nginx/wok config file on another machine (i changed 127.0.0.1 ip's to the right one)
Here is the config file i've made that gave me a 502 bad gateway error
Also used this file on the wok machine but didn't work too.
server {
server_name vm.mndevs.host;
listen vm.mndevs.host:80;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://192.168.2.6:8010;
proxy_redirect https://192.168.2.6:8010 https://$host:8001/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/vm.mndevs.host/fullchain.pem; # managed by Certbot}
ssl_certificate_key /etc/letsencrypt/live/vm.mndevs.host/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = vm.mndevs.host) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name vm.mndevs.host;
listen 80;
return 404; # managed by Certbot
}
If you need more detailed info about the setup, please let me know
Metadata
Metadata
Assignees
Labels
No labels