User Tools

Site Tools


wiki:nginx_troubleshooting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:nginx_troubleshooting [2024/09/25 08:37] – [The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key] update link to nginx repo antisawiki:nginx_troubleshooting [2026/03/18 10:17] (current) – [Headers not proxied to backend server] add test app link antisa
Line 108: Line 108:
   * nginx/1.23.1   * nginx/1.23.1
   * Debian 10 Buster   * Debian 10 Buster
 +
 +===== Headers not proxied to backend server =====
 +
 +If you are setting proxy headers like:
 +<code | download>
 +
 +location / {
 +        proxy_pass         http://app-container:8080;
 +        proxy_set_header   Host $http_host;
 +        proxy_set_header   X-Https 1;
 +        proxy_set_header   X-NginX-Proxy true;
 +        proxy_set_header   X-Real-IP $remote_addr;
 +        proxy_set_header   X-Forwarded-For $remote_addr;
 +}
 +
 +</code>
 +
 +they will only be visible in the app when 200 OK code is returned. Also headers can't have underscores in them unless ''underscores_in_headers on;'' is set as well.
 +
 +Use [[wiki:test_app_printing_http_headers|this app]] to test the received headers.
  
 ====== See also ====== ====== See also ======
wiki/nginx_troubleshooting.1727253454.txt.gz · Last modified: by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki