# Perspective & nginx - Sign out & 502 Bad Gateway

**URL:** <https://forum.inductiveautomation.com/t/perspective-nginx-sign-out-502-bad-gateway/38017>\
**Category:** Ignition\
**Created:** [August 24, 2020, 11:30am UTC](https://forum.inductiveautomation.com/t/perspective-nginx-sign-out-502-bad-gateway/38017 "2020-08-24T11:30:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sammy5](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Sammy5](https://forum.inductiveautomation.com/u/Sammy5)\
**Post date:** [August 24, 2020, 11:30am UTC](https://forum.inductiveautomation.com/t/perspective-nginx-sign-out-502-bad-gateway/38017/1 "2020-08-24T11:30:39Z")

</div>

Kind of hoping someone else using nginx and Perspective has encountered this and found a solution. We are using nginx for both SSL and rewrite. While that does work, the issue is when I go to sign out nginx gives me “502 Bad Gateway” error. Worse if I hit enter in the address bar I will be redirected back to the login where I need to sign in again. But my credentials appear to be cached so I do not have to re-enter username and password it just logs me back in (kind of defeating purpose of logging out.

My nginx config:

```auto
        location /{
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;            
            proxy_set_header Connection "upgrade";
            proxy_pass http://127.0.0.1:8088;
        }
        location /TestProject01{
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_pass http://127.0.0.1:8088/data/perspective/client/TestProject01;
    	    rewrite ^/TestProject01$ /data/perspective/client/TestProject01/ permanent;
        }

```

I tried a rewrite of ‘logout’ with no success, don’t know if I had the correct syntax or not. What I think I need is somehow to have the connection fully closed on sign out plus redirect to the login or portal screen.

Can this be done? Has anyone else encountered this?

---

<div class="post-metadata">

**Author:** ![ataya](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@ataya](https://forum.inductiveautomation.com/u/ataya)\
**Post date:** [February 29, 2024, 9:52pm UTC](https://forum.inductiveautomation.com/t/perspective-nginx-sign-out-502-bad-gateway/38017/2 "2024-02-29T21:52:21Z")

</div>

Hi @Sammy5 , did you figure this out? I have the same `502 Bad Gateway` error when logging out.  
Ignition version is 8.1.35.
