# Trouble migrating from pound to nginx

**URL:** <https://www.ruby-forum.com/t/trouble-migrating-from-pound-to-nginx/228423>\
**Category:** NGINX\
**Created:** [April 22, 2013, 9:53am UTC](https://www.ruby-forum.com/t/trouble-migrating-from-pound-to-nginx/228423 "2013-04-22T09:53:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 22, 2013, 9:53am UTC](https://www.ruby-forum.com/t/trouble-migrating-from-pound-to-nginx/228423/1 "2013-04-22T09:53:13Z")

</div>

Hi.

I have some trouble here migration from the loadbalancer pound to nginx.  
Nginx should be running as a loadbalancer for our webapplications which  
are  
hosted on apache webservers in our lan.

The basic configuration looks like this:

lb(nginx) -----\> two webservers(apache) -----\> one or more  
applicationserver(glassfish)

The old configuration is the same, we only used pound instead of nginx.

But for any reason the the webapplication wouldn’t be delivered and I  
got  
the apache default site instead.

I posted my configuration to [pastbin.com](http://pastbin.com). Please note that I anonymized  
hostnames, domainnames and ips.

- nginx.conf - [http://pastebin.com/iej9RQx1](http://pastebin.com/iej9RQx1)
- vhost config - [http://pastebin.com/zVUPWX8A](http://pastebin.com/zVUPWX8A)

Thanks in advance for helping me.

Best Regards,  
Joerg

---

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 22, 2013, 10:08am UTC](https://www.ruby-forum.com/t/trouble-migrating-from-pound-to-nginx/228423/2 "2013-04-22T10:08:59Z")

</div>

I’m on a sufficiently dreadful connection that I can’t examine your  
configs on pastebin. Having said that, I strongly suspect you’re not  
propagating a Host header from NginX to your Apache servers. Fix that  
up, and I think you’ll have more success.

Regards,  
Jonathan

–  
Jonathan M.  
Oxford, London, UK  
[http://www.jpluscplusm.com/contact.html](http://www.jpluscplusm.com/contact.html)

---

<div class="post-metadata">

**Author:** ![SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@SSJSSrg\_KastningSS\_S](https://www.ruby-forum.com/u/SSJSSrg_KastningSS_S)\
**Post date:** [April 22, 2013, 11:31am UTC](https://www.ruby-forum.com/t/trouble-migrating-from-pound-to-nginx/228423/3 "2013-04-22T11:31:59Z")

</div>

You’re right. I added the following line to my location block:

proxy\_set\_header Host “my.forced.hostname”;  
Now I get the expected Site. Thanks for your support.

2013/4/22 Jonathan M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
