# Getting 502 error with nginx reverse proxy

**URL:** <https://community.hubspot.com/t/getting-502-error-with-nginx-reverse-proxy/94357>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [November 20, 2023, 7:57am UTC](https://community.hubspot.com/t/getting-502-error-with-nginx-reverse-proxy/94357 "2023-11-20T07:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![09747](https://avatars.discourse-cdn.com/v4/letter/0/ba8739/32.png) [@09747](https://community.hubspot.com/u/09747)\
**Post date:** [November 20, 2023, 7:57am UTC](https://community.hubspot.com/t/getting-502-error-with-nginx-reverse-proxy/94357/1 "2023-11-20T07:57:55Z")

</div>

I’m not sure if this is coming from the HubSpot rules or something, but I have configured the nginx proxy for some URLs on HubSpot, and the GoogleBot is getting a 5xx error after that.

Although the website can be accessed normally, it’s blocking non-common user agents. Can you please help me to verify it?

Here is my config:

```lia-code-sample
location ~* ^/customers {
 proxy_set_header Host xxx.hs-sites-eu1.com;
 proxy_set_header X-HS-Public-Host xxx.hs-sites-eu1.com;
 proxy_pass https://xxx.hs-sites-eu1.com;
 proxy_ssl_name xxx.hs-sites-eu1.com;
 proxy_ssl_server_name on;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 proxy_set_header X-HubSpot-Client-IP $proxy_protocol_addr;
 proxy_pass_request_headers on;
 proxy_set_header X-HubSpot-Trust-Forwarded-For true;
}

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 21, 2023, 6:26pm UTC](https://community.hubspot.com/t/getting-502-error-with-nginx-reverse-proxy/94357/2 "2023-11-21T18:26:13Z")

</div>

Hey, @09747 👋 Did you already reach out to support? I ask because you indicated this is for a portal with an enterprise subscription.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![09747](https://avatars.discourse-cdn.com/v4/letter/0/ba8739/32.png) [@09747](https://community.hubspot.com/u/09747)\
**Post date:** [November 22, 2023, 3:25am UTC](https://community.hubspot.com/t/getting-502-error-with-nginx-reverse-proxy/94357/3 "2023-11-22T03:25:10Z")

</div>

Thanks for replying [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)

It seems like they do not support this and request to pay to discuss it with Technical Support so I want to try here to look for someone who may help me on this matter.
