Hello,
after upgrade Nginx 1.0.15 to 1.2.2 I m dealing with a problem or redirects loop.
My setup is nginx + apache, and wordpress based websites.
website that uses php-fpm instead of apache was working fine.
I found similar discussion in the internet without solution
http://serverfault.com/questions/386328/nginx-1-2-causes-redirect-loop-with-wordpress-and-apache
my website config:
server {
listen 80;
server_name www.domain.com;
access_log /var/log/www/www.domain.com/nginx_access.log combined;
error_log /var/log/www/www.domain.com/nginx_error.log;
root /srv/www/vhosts/www.domain.com/www;
index index.php index.html;
location / {
try_files $uri $uri/ @backend;
}
location ~* \.(ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location ~ \.php$ {
proxy_pass http://127.0.0.1:81;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}
location @backend {
proxy_pass http://127.0.0.1:81;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
}
include drop.conf;
}
what could be the problem ?
thank you.