[Kimchi-devel] [PATCH] [Wok] Bug fix: Configure nginx to listen on given IP address
Paulo Vital
pvital at linux.vnet.ibm.com
Thu Feb 11 20:50:28 UTC 2016
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>
On 02/11/2016 06:39 PM, Aline Manera wrote:
> The 'host' option was being ignored when launching nginx proxy. That
> way, the default value - 0.0.0.0 to listen to all interfaces - was being
> used. Fix it.
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
> src/nginx/wok.conf.in | 4 ++--
> src/wok/proxy.py | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/nginx/wok.conf.in b/src/nginx/wok.conf.in
> index 85790ff..9ae2530 100644
> --- a/src/nginx/wok.conf.in
> +++ b/src/nginx/wok.conf.in
> @@ -59,7 +59,7 @@ http {
> }
>
> server {
> - listen ${proxy_ssl_port} ssl;
> + listen ${host}:${proxy_ssl_port} ssl;
>
> ssl_certificate ${cert_pem};
> ssl_certificate_key ${cert_key};
> @@ -90,7 +90,7 @@ http {
> }
>
> server {
> - listen ${proxy_port};
> + listen ${host}:${proxy_port};
> rewrite ^/(.*)$ https://$host:${proxy_ssl_port}/$1 redirect;
> }
> }
> diff --git a/src/wok/proxy.py b/src/wok/proxy.py
> index f13dede..d508b73 100644
> --- a/src/wok/proxy.py
> +++ b/src/wok/proxy.py
> @@ -81,6 +81,7 @@ def _create_proxy_config(options):
> data = template.read()
> data = Template(data)
> data = data.safe_substitute(user=user_proxy,
> + host=options.host,
> proxy_port=options.port,
> proxy_ssl_port=options.ssl_port,
> cherrypy_port=options.cherrypy_port,
>
More information about the Kimchi-devel
mailing list