I'm tring to make many django/gunicorn app on one server. Each app listen on one specific port. My nginx conf is like :
upstream my_app_2318 {
server unix:/tmp/gunicorn-2318.sock fail_timeout=10s
}
server {
listen *:2318;
server_name example.com;
index index.html index.htm index.php;
access_log /opt/2318/logs/nginx_access.log combined;
error_log /opt/2318/logs/nginx_error.log;
location / {
proxy_pass http://my_app_2318;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
}
}
This conf work for GET request (when i acces to example.com:2318/my-url), but any POST request (submit form) redirect me on 80 port (example.com/my-new-url).
What's wrong with my conf ?
Thanks
proxy_redirect off;proxy_redirect default;i have same problemLocationheaderactionattribute of yourformtag.