From aa3bc3225ee96347da8e7866ddf3f3b764c08c4b Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Wed, 27 Aug 2014 02:38:43 +0000 Subject: [PATCH] expose the control panel only on PRIMARY_HOSTNAME since /admin might conflict with other stuff hosted on other domains --- conf/nginx-primaryonly.conf | 7 +++++++ conf/nginx.conf | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index d7457ed..d3d09da 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -1,3 +1,10 @@ + # Control Panel + rewrite ^/admin$ /admin/; + location /admin/ { + proxy_pass http://localhost:10222/; + proxy_set_header X-Forwarded-For $remote_addr; + } + # ownCloud configuration. rewrite ^/cloud$ /cloud/ redirect; rewrite ^/cloud/$ /cloud/index.php; diff --git a/conf/nginx.conf b/conf/nginx.conf index ea7e40d..d1786b7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -24,13 +24,6 @@ server { root $ROOT; index index.html index.htm; - # Control Panel - rewrite ^/admin$ /admin/; - location /admin/ { - proxy_pass http://localhost:10222/; - proxy_set_header X-Forwarded-For $remote_addr; - } - # Roundcube Webmail configuration. rewrite ^/mail$ /mail/ redirect; rewrite ^/mail/$ /mail/index.php;