Reverse proxy via Passenger/Nginx on Heroku -


i have rails app on heroku , need create reverse proxy our blog, hosted on dreamhost. hosted @ blog.ourdomain.com want ourdomain.com/blog point it. research seems best reverse proxy via nginx component of our passenger application server. so, i've created location in our nginx.conf.erb:

    location ^~ /blog {         proxy_pass https://blog.ourdomain.com;     } 

this works fine our purposes, except when /blog visited. (/blog/, /blog/whatever/... fine).

when /blog used, nginx instead redirects ourdomain.com:12345/blog/ port assume our heroku dyno's port. how can slash-less uri go reverse proxy correctly?

i've run same problem well. still haven't gotten our proxy functioning - running weird redirect loops on wordpress / apache side - did solve manually setting port:

location ^~ /blog {     proxy_pass https://blog.ourdomain.com:80; } 

i'm not confident enough in nginx knowledge work sure, seems working us.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -