unicorn - NGINX not responding -


i have 3 sites configured on server using nginx , first 2 working fine. 1 static site , 1 running rails (using unicorn). have attempted mirror nginx/unicorn configurations.

for non-working site, "problem loading site" in browser , absolutely nothing in nginx error logs (even @ debug level) or unicorn log. nothing when attempt curl site.

i have double checked dns pinging domain name , running out of ideas. i've tried making default server , browsing ip address.

thoughts on how should go debugging? @ least understand if nginx seeing these requests or not.

nginx configuration:

upstream unicorn-signup {   server unix:/home/signup/app/tmp/sockets/unicorn.sock; }  server {         listen 80;         listen [::]:80;          root /home/signup/app/current/public;         server_name signup.quote2bill.com;          # configure unicorn (nginx acts reverse proxy)         location / {                 try_files $uri @unicorn;         }          location @unicorn {                 proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;                 proxy_set_header host $http_host;                 proxy_set_header x-forwarded_proto $scheme;                 proxy_redirect off;                 proxy_pass http://unicorn-signup;                 proxy_read_timeout 300s;                 proxy_send_timeout 300s;         } } 

fixed! dreaded force_ssl flag in production configuration. future travelers, here how went troubleshooting:

  1. went on costco run clear mind , buy huge quantities of stuff.
  2. to determine if dns, nginx or unicorn/rails problem, replaced nginx configuration simple 1 , placed simple index.html in public root. worked fine - lets dns off hook (i resolve domain name @ web server).
  3. i diff'd working , non-working nginx configuration files nth time , made them close possible didn't find anything.
  4. then noticed when serving simple index.html file in #2 above, domain not getting redirected https:// when switched "normal" unicorn/rails version, getting redirected.
  5. i searched rails redirecting ssl , remembered force_ssl flag.
  6. i checked 2 projects , noticed flag not set in working project, set in non-working 1 (smoking gun).
  7. i changed, committed, redeployed , reloaded browser , it... didn't work (!) fortunately, had sense clear browser cache , try again , now.

hope helps someone.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -