Distribution of requests to multiple lxc containers

Johannes Graumann johannes_graumann at web.de
Thu Aug 2 05:45:36 UTC 2012


Dear all,

My setup is to run multiple web services in different lxc containers and 
nginx on the host to distribute requests to the appropriate container. I'm 
trying the two entries below as seperate files in sites-available/sites-
enabled, but requests to "mail.MAYDOMAIN.org" (trying to reach the lxc 
container (supposedly) proxied by the second entry) end up returning an 
error produced by the the first one.

Any insight into this newbies folly would be highly appreciated - where do I 
err?

Thank you for your time.

Sincerely, Joh

PS: Can the SSL related entries be put into one joint place for all entries 
rather than repeating it? JG

> server {
>         listen   443;
>         server_name  MYDOMAIN.org HOSTING.net;
>         client_max_body_size 40M;
>         # SSL is using CACert credentials
>         ssl  on;
>         ssl_certificate  /etc/ssl/private/cacert.MYDOMAIN.org.pem;
>         ssl_certificate_key 
/etc/ssl/private/cacert.MYDOMAIN.org_privatkey.pem;
>         ssl_session_timeout  5m;
>         ssl_protocols  SSLv3 TLSv1;
>         ssl_ciphers  ALL:!ADH:!EXPORT56:!LOW:RC4+RSA:+HIGH:+MEDIUM:+SSLv3:
+EXP;
>         ssl_prefer_server_ciphers   on;
>         # Proxy the "plone.MYDOMAIN.org" lxc container
>         location / {
>                 proxy_pass 
http://10.10.10.2:8080/VirtualHostBase/https/HOSTING.net:443/MYDOMAINPlone/VirtualHostRoot/;
>         }
> }


> server {
>         listen   443;
>         server_name  mail.MYDOMAIN.org mail.HOSTING.net;
>         client_max_body_size 40M;
>         # SSL is using CACert credentials
>         ssl  on;
>         ssl_certificate  /etc/ssl/private/cacert.MYDOMAIN.org.pem;
>         ssl_certificate_key  
/etc/ssl/private/cacert.MYDOMAIN.org_privatkey.pem;
>         ssl_session_timeout  5m;
>         ssl_protocols  SSLv3 TLSv1;
>         ssl_ciphers  ALL:!ADH:!EXPORT56:!LOW:RC4+RSA:+HIGH:+MEDIUM:+SSLv3:
+EXP;
>         ssl_prefer_server_ciphers   on;
>         # Proxy the "kolab.MYDOMAIN.org" lxc container
>         location / {
>                 proxy_pass http://10.10.10.4;
>         }
> }




More information about the nginx mailing list