# Automation Platform 2.5 reverse proxy to gateway

**URL:** <https://forum.ansible.com/t/automation-platform-2-5-reverse-proxy-to-gateway/39808>\
**Category:** Get Help\
**Tags:** aap, automation-platform\
**Created:** [January 24, 2025, 1:10pm UTC](https://forum.ansible.com/t/automation-platform-2-5-reverse-proxy-to-gateway/39808 "2025-01-24T13:10:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonk](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tonk/32/214_2.png) [@tonk](https://forum.ansible.com/u/tonk)\
**Post date:** [January 24, 2025, 1:10pm UTC](https://forum.ansible.com/t/automation-platform-2-5-reverse-proxy-to-gateway/39808/1 "2025-01-24T13:10:30Z")

</div>

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:

```auto
# 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

---

<div class="post-metadata">

**Author:** ![tonk](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tonk/32/214_2.png) [@tonk](https://forum.ansible.com/u/tonk)\
**Post date:** [January 31, 2025, 12:25pm UTC](https://forum.ansible.com/t/automation-platform-2-5-reverse-proxy-to-gateway/39808/2 "2025-01-31T12:25:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 2, 2025, 12:26pm UTC](https://forum.ansible.com/t/automation-platform-2-5-reverse-proxy-to-gateway/39808/3 "2025-03-02T12:26:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
