[GH-ISSUE #1386] I always get a 502 Bad Gateway error when I navigate to the root of a logged drupal site #1088

Closed
opened 2026-02-26 06:35:43 +03:00 by kerem · 3 comments
Owner

Originally created by @cjamcu on GitHub (Sep 8, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1386

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug
I have a proxy host pointing to a site made with drupal 9. When I log into the site and navigate to the root I always get a 502 Bad Gateway error. I have tried to set custom settings but I am not successful.

PD : If I do the same flow but by the ip of the service I have no problem.

Originally created by @cjamcu on GitHub (Sep 8, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1386 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Checklist** - Have you pulled and found the error with `jc21/nginx-proxy-manager:latest` docker image? - Yes - Are you sure you're not using someone else's docker image? - Yes - Have you searched for similar issues (both open and closed)? - Yes **Describe the bug** I have a proxy host pointing to a site made with drupal 9. When I log into the site and navigate to the root I always get a **502 Bad Gateway error**. I have tried to set custom settings but I am not successful. **PD : If I do the same flow but by the ip of the service I have no problem.**
kerem 2026-02-26 06:35:43 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jc21 commented on GitHub (Sep 8, 2021):

Sounds like the docker container for NPM can't communicate with your drupal site. You'll have to ensure that the scheme/ip/hostname/port of the drupal site is correct in the proxy config. You can confirm it's connectivity on the command line by running something like:

docker run --rm -ti name_of_npm_container curl http://hostname_of_drupal:80
<!-- gh-comment-id:915604398 --> @jc21 commented on GitHub (Sep 8, 2021): Sounds like the docker container for NPM can't communicate with your drupal site. You'll have to ensure that the scheme/ip/hostname/port of the drupal site is correct in the proxy config. You can confirm it's connectivity on the command line by running something like: ```bash docker run --rm -ti name_of_npm_container curl http://hostname_of_drupal:80 ```
Author
Owner

@cjamcu commented on GitHub (Sep 9, 2021):

The proxy is well configured because when I have not logged in the site works fine. This is verified by the curl that tells me to run, it is responding correctly. The curl works because it is being done without a user session. Thank you

<!-- gh-comment-id:916113559 --> @cjamcu commented on GitHub (Sep 9, 2021): The proxy is well configured because when I have not logged in the site works fine. This is verified by the curl that tells me to run, it is responding correctly. The curl works because it is being done without a user session. Thank you
Author
Owner

@cjamcu commented on GitHub (Sep 10, 2021):

@jc21 The real problem was upstream sent too big header while reading response header from upstream . I solved this by adding this advanced configuration

  location / {
   proxy_buffer_size   128k;
    proxy_buffers   4 256k;
    proxy_busy_buffers_size   256k;

    # Proxy!
    include conf.d/include/proxy.conf;
  }
<!-- gh-comment-id:916956945 --> @cjamcu commented on GitHub (Sep 10, 2021): @jc21 The real problem was `upstream sent too big header while reading response header from upstream` . I solved this by adding this advanced configuration ``` location / { proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; # Proxy! include conf.d/include/proxy.conf; } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1088
No description provided.