[Kimchi-devel] [PATCH][Wok] Issue #166: wok is pointing to /etc/nginx/conf.d which does not exists on OpenSuse 42.1

Daniel Henrique Barboza dhbarboza82 at gmail.com
Wed Sep 28 14:01:51 UTC 2016


Ramon is right, nginx by default expects the conf files to be hosted @ 
conf.d dir,
even in the Opensuse case where the dir isn't created by default.

As he said in one of his answers, we either (1) create the conf.d dir or (2)
change nginx.conf to add a new include line to get wok.conf from /etc/nginx.
Both are undesirable but (1) is the most sane of them.


Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>


On 09/21/2016 02:58 PM, Ramon Medeiros wrote:
> Create dir if not exist
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
>   src/wok/proxy.py | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/src/wok/proxy.py b/src/wok/proxy.py
> index b68b86e..4b06fc2 100644
> --- a/src/wok/proxy.py
> +++ b/src/wok/proxy.py
> @@ -116,6 +116,11 @@ def _create_proxy_config(options):
>       # SSL certifications.
>       if not paths.installed:
>           dst = os.path.join(paths.sys_nginx_conf_dir, "wok.conf")
> +
> +        # directoy does not exist: create it
> +        if not os.path.exists(paths.sys_nginx_conf_dir):
> +            os.makedirs(paths.sys_nginx_conf_dir)
> +
>           if os.path.isfile(dst) or os.path.islink(dst):
>               os.remove(dst)
>           os.symlink(os.path.join(nginx_config_dir, "wok.conf"), dst)




More information about the Kimchi-devel mailing list