Open Raidm404 opened 8 months ago
Here is the Nginx passenger configuration.
location / {
log_not_found off;
client_max_body_size 2000m;
client_body_buffer_size 512k;
# Python WSGI
passenger_enabled on;
passenger_app_type wsgi;
passenger_python /home/site/XXX/bin/python3;
passenger_startup_file wsgi.py;
passenger_user site;
passenger_group site;
# To test for production or development
passenger_app_env production;
}
Settings the following headers in Passenger configuration fixed this issue
passenger_set_header Host $host;
passenger_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Hello, I am testing Passenger with Nginx on http3/quic and it breaks the Python Django apps.
Testing Environment
Error Logs in Nginx
Don't add 127.0.0.1 in ALLOWED_HOSTS on Django settings, which will still result in replacing all links with 127.0.0.1 instead of the domain name
The same application will work on http2 If you like to see the Nginx configuration of http3, please have a look at https://nginx.org/en/docs/quic.html
I can also find a similar issue on the rack session https://github.com/rack/rack/discussions/2039