Welcome! Log In Create A New Profile

Advanced

reverse proxy timeouts on some HTTPS, but works fine on the same HTTP

Posted by andres 
reverse proxy timeouts on some HTTPS, but works fine on the same HTTP
November 06, 2012 02:16PM
I have a very basic setup of ngnix as a proxy to unicorn on a socket,
everyhing works almost just fine,

the only problem I have is that when a request to https:// takes more than 5 secons,
then I get a disconect (or 304 error in chrome),

the same request to the http page of it, comes just fine.

there's no overwrite of any of the default timeout values, (which are all 60 seconds)

the reverse proxy config is here


upstream unicorn_server {
# this socket is set up on the config/unicorn.rb file
server unix:/home/sage/apps/sage/production/shared/.unicorn.sock;
}

server {
listen 80;

root /home/sage/apps/sage/production/current/public;

location / {
proxy_set_header X-Forwarded-For $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;

if (!-f $request_filename) {
proxy_pass http://unicorn_server;
break;
}
}

}

server {
listen 443;

ssl on;
ssl_certificate /etc/ssl/certs/cert.com.chained.crt;
ssl_certificate_key /etc/ssl/certs/sert.com.key;

root /home/sage/apps/sage/production/current/public;

location / {
proxy_set_header X-Forwarded-For $scheme;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;

if (!-f $request_filename) {
proxy_pass http://unicorn_server;
break;
}
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready