简体   繁体   中英

How do I offload from https to http on NGINX?

This question has been asked awhile ago but I am not sure it fits my needs so I want to explain my usage.

First warn, I am a noob.

We have an nginx reverse proxy with a cert. It directs to another nginx app server without a cert (internal communications don't need to be over https). Basically want to off load from https to http internally.

How do we configure it so we hit the app server on port 80? It still appears to be hitting the app server on 443. Getting an ERR_CERT_COMMON_NAME_INVALID error. I assume that it is being thrown by the app server.

In proxy.conf we have set:

 proxy_pass http://<app server ip address>

You don't want to redirect, you want to proxy.

It sounds like the certificate on the nginx proxy server is not correct. Specifically that the certificate and the domain don't match

location /some/path/ {
    proxy_pass http://www.example.com/link/;
}

https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM