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/09 12:44] – add signature invalid info antisawiki:nginx_troubleshooting [2026/03/18 10:17] (current) – [Headers not proxied to backend server] add test app link antisa
Line 103: Line 103:
   apt-key add /usr/share/keyrings/nginx-archive-keyring.gpg   apt-key add /usr/share/keyrings/nginx-archive-keyring.gpg
  
-After you've added the [[https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#installing-prebuilt-debian-packages|repo.]]+After you've added the [[https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#installing-a-prebuilt-debian-package-from-the-official-nginx-repository|repo.]]
  
 ==== Tested on ==== ==== Tested on ====
   * 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.1725885886.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