diff --git a/contrib/nginx.conf b/contrib/nginx.conf index 34821cd52..ad8ee9e31 100644 --- a/contrib/nginx.conf +++ b/contrib/nginx.conf @@ -14,10 +14,12 @@ server { } location / { - proxy_pass http://127.0.0.1:8001; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; + include uwsgi_params; + uwsgi_pass 127.0.0.1:8001; + uwsgi_param Host $host; + uwsgi_param X-Real-IP $remote_addr; + uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; + uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; } } diff --git a/docs/installation/5-http-server.md b/docs/installation/5-http-server.md index b81c6d84a..3690bb256 100644 --- a/docs/installation/5-http-server.md +++ b/docs/installation/5-http-server.md @@ -89,6 +89,6 @@ If you are unable to connect to the HTTP server, check that: If you are able to connect but receive a 502 (bad gateway) error, check the following: -* The WSGI worker processes (gunicorn) are running (`systemctl status netbox` should show a status of "active (running)") +* The WSGI worker processes (uWSGI) are running (`systemctl status netbox` should show a status of "active (running)") * Nginx/Apache is configured to connect to the port on which gunicorn is listening (default is 8001). * SELinux is not preventing the reverse proxy connection. You may need to allow HTTP network connections with the command `setsebool -P httpd_can_network_connect 1`