I've already deployed on my server the jwilder/nginx-proxy and some apps running with docker, and it's working with no problems.
Now, I want to deploy some apps that don't have docker using the apache web server installed in my ubuntu server. I've changed the apache port from 80 to 81 and when I go to localhost:81, I can see the main page of the ubuntu server; however, when I try to redirect to that address and port using the nginx reverse proxy (i.e. localhost/example_page) I get an 502 Bad Gateway error.
I'm trying to redirect to the apache server like this in my default file in the vhost.d folder:
location /example_page/{
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:81/;
proxy_connect_timeout 1200;
proxy_send_timeout 1200;
proxy_read_timeout 1200;
send_timeout 1200;
}
Can you give me some ideas to make this work or tell me another alternative, please?
Thanks in advance.