Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Nginx Reverse proxy Wok #311

Open
MauriceNorden opened this issue Dec 25, 2020 · 0 comments
Open

Can't Nginx Reverse proxy Wok #311

MauriceNorden opened this issue Dec 25, 2020 · 0 comments

Comments

@MauriceNorden
Copy link

MauriceNorden commented Dec 25, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant