Welcome! Log In Create A New Profile

Advanced

Sub-domains through different /etc/nginx/sites-enabled entries?

Johannes Graumann
August 03, 2012 04:04AM
Hello,

I'm refining here my question that remained unanswered under the topic
"Distribution of requests to multiple lxc containers" ...

Is it possible to distribute sub-domains of one domain through independent
files/links in sites-available/sites-enables entries? I'd love to have the
flexibility to enable/disable services running at different sub-domains
without having to edit a (joined) file/link, but with the two entries below
requests to "mail.MYDOMAIN.org" (trying to reach a lxc
container (supposedly) proxied by the second entry) end up returning an
error produced by the the first one.

Thanks for any pointers on what I might be doing wrong or whether I have to
resort to one sites-available/enabled file.

Joh

> 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;
> }
> }


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Sub-domains through different /etc/nginx/sites-enabled entries?

Johannes Graumann August 03, 2012 04:04AM

Re: Sub-domains through different /etc/nginx/sites-enabled entries?

unai August 03, 2012 05:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready