Author Topic: Nginx Reverse Proxy  (Read 16055 times)

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Nginx Reverse Proxy
« Reply #60 on: October 08, 2011, 03:57:16 am »
You would need to get into the /etc/apache2/sites-available/  and edit the vhost file there to have it bind to a specific lan interface.  By default, it binds to all devices.

christian

  • Guest
Re: Nginx Reverse Proxy
« Reply #61 on: October 08, 2011, 06:45:03 am »
sure, this is what need to be done but not that simple, at least to me.
Not because of "vi" of course  ;D but because mixing directives to have both "vhost by name" and "vhost by IP" never works easily  :-[
+ you will have to strongly tweak *mas files of use hook don't you?
« Last Edit: October 08, 2011, 07:03:23 am by christian »

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Nginx Reverse Proxy
« Reply #62 on: October 09, 2011, 05:43:49 pm »
I guess at this point I don't understand than why if you point "proxy_pass to http://test" which is a good vhost .... why it just goes to the default "It Works" website.



christian

  • Guest
Re: Nginx Reverse Proxy
« Reply #63 on: October 10, 2011, 07:57:24 am »
I suppose this is because of the "vhost by name" mechanism.
Did you try, for test purpose only, to forward it to another internal web server that is not vhost on Zentyal itself, still using server name rather than IP address?

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: Nginx Reverse Proxy
« Reply #64 on: October 10, 2011, 02:29:37 pm »
Yes I have tried to connect by name.  I have an acer revo running as a client machine which has XBMC on it.  The XMBC has a web gui enabled on port 80.  If I set proxy_pass http://revo.home.lan.... it takes me right to the XBMC web interface.

So I know NGINX works, but unfortunately not for my vhost.  This might not be a complete problem since all I have to do is just not use vhost for either the external website of zarafa mail service.  I just liked the vhost approach because you can force SSL .... with zarafa this made it easier than having to reconfigure the zarafa files themselves to automatically go to HTTPS version.

With hardware not being an issue... what do you think about making a virtual server as zentyal slave... installing a full lamp stack and zarafa (basically using it for just webserver and mail).  This way I can get NGINX to point right at it by name and possibly avoid the vhost problem?????