Problem configuring Nginx to host SpreeCommerce - 502 error

mex nginx-forum at nginx.us
Thu Mar 7 08:26:33 UTC 2013


Joseph O. Wrote:
-------------------------------------------------------

ok, first make sure your railsapp is loading as expected and
working w/out nginx in front; you can check it from that machine using
w3m/lynx or telnet. if this works we'll check the nginx-part.


> *sigh* Clearly I am missing something here, as the only nginx.conf
> file 
> I have is the one I posted last night. There is no upstream server;
> the 
> code for that was from the example config file I was trying to modify 
> for my purposes.

you define a upstream {} section but you dont use it later, instead of
proxy_pass $upstream you define proxy_pass to use a hostname
instead of your upstream; thats a mismatch in your config




> 
> It seems that this copypasta approach isn't adequate for setting this
> up properly 

+1 :)

you'll find some howtos and best-practice-guides for various applications
here: http://wiki.nginx.org/Configuration

but understanding what you're doing is key for long-time-happyness.
basically, your setup is quite simple and straight-forward. 



regards, 


mex

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236971,237037#msg-237037



More information about the nginx mailing list