Automation Platform 2.5 reverse proxy to gateway

Hi all,

I have installed Ansible Automation Platform 2.5 (both RPM base and continer based) and I want to use a reverse nginx proxy to connect to the Platform Gateway.

I already did this with 2.4 and a connection to the control node or autohub and that worked perfectly. But with the Gateway I either get a complete blank screen or a 502 - Bad Gateway.

This is the nginx config that I use:

# vi: set sw=4 ts=4 ai:
server  {
    listen                          80;
    server_name                     gw01.example.net;

    return                          301 https://gw01.example.net$request_uri;
}

server  {
    listen                          443     ssl;
    server_name                     gw01.example.net;

    ssl_certificate                 /etc/lego_tls/certificates/_.example.net.crt;
    ssl_certificate_key             /etc/lego_tls/certificates/_.example.net.key;
    ssl_session_timeout             5m;
    ssl_protocols                   TLSv1   TLSv1.1 TLSv1.2;
    ssl_ciphers                     HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers       on;

    location /websocket/ {
        proxy_pass                 https://gw01.example.net;
        proxy_http_version         1.1;
        proxy_set_header           Connection "upgrade";
        proxy_set_header           Host $host;
        proxy_set_header           Upgrade $http_upgrade;
        proxy_set_header           X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header           X-Forwarded-Proto https;
        proxy_set_header           X-Real-IP $remote_addr;
        proxy_read_timeout         86400;
        proxy_redirect             off;
        proxy_ssl_verify           off;
        proxy_ssl_session_reuse    on;
        proxy_ssl_server_name      on;
    }

    location / {
        proxy_pass                 https://gw01.example.net;
        proxy_http_version         1.1;
        proxy_set_header           Connection "upgrade";
        proxy_set_header           Host $host;
        proxy_set_header           Upgrade $http_upgrade;
        proxy_set_header           X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header           X-Forwarded-Proto https;
        proxy_set_header           X-Real-IP $remote_addr;
        proxy_read_timeout         86400;
        proxy_redirect             off;
        proxy_ssl_verify           off;
    }
}

Any good ideas are appreciated.

Thanks

I have found / fixed it.

Turns out that the default nginx on RHEL is in fact to old.
After upgrading mnginx to version 1.24 the problems where solved.

1 Like