I've been running an Nginx X-Accel Proxy in development with the following config:
upstream gate_proxy {
server 127.0.0.1:8889;
}
server {
listen 80 default_server;
server_name default;
charset utf-8;
client_max_body_size 75M;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Send all traffic to gate first
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_pass http://gate_proxy;
}
# Proxy to Apache after X-Accel
location /x-accel-apache/ {
internal;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
# Make sure the trailing slash is maintained here, as this affects the URI relayed.
proxy_pass http://127.0.0.1:8081/;
}
}
Which was working fine, until I realised my Nginx was 1.4.6 and very out of date as I near production and seek to make sure I have the latest updates etc.
Now with 1.10.1 this no longer works and all POST requests are received as such in Nginx on the frontline, but when they are eventually proxied to http://127.0.0.1:8081/ they are received as GET method.
EDIT: Also, confirmed that gate_proxy (http://127.0.0.1:8889) also receives POST method still after the update.