I have issues setting up Zabbix Nginx from docker compose to accept SSL certificates.
Here what I have in my docker-compose:
I copied ssl.key, ssl.crt and dhparams.pem to exposed volume folder ./web/ssl
After container starts, I logged in to container to verify that certificate files appeared in /etc/ssl/nginx location:
However , container logs show this in the beginning and I assume nginx did not see cert files at all:
********************
** Adding Zabbix virtual host (HTTP)
**** Impossible to enable SSL support for Nginx. Certificates are missed.
** Preparing Zabbix frontend configuration file
It used to work on a different installation with original set of compose files from zabbix, here we tried to simplify setup but I have no idea what else should be set.
Please chime in if you have any ideas.
Here what I have in my docker-compose:
zabbix-web:
container_name: zabbix-web
image: zabbix/zabbix-web-nginx-mysql:alpine-6.4-latest
ports:
- 80:8080
- 443:8443
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./web/ssl:/etc/ssl/nginx:ro
- ./web/modules/:/usr/share/zabbix/modules/:ro
environment:
- ZBX_SERVER_HOST=zabbix-server
- DB_SERVER_HOST=zabbix-mysql
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
container_name: zabbix-web
image: zabbix/zabbix-web-nginx-mysql:alpine-6.4-latest
ports:
- 80:8080
- 443:8443
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./web/ssl:/etc/ssl/nginx:ro
- ./web/modules/:/usr/share/zabbix/modules/:ro
environment:
- ZBX_SERVER_HOST=zabbix-server
- DB_SERVER_HOST=zabbix-mysql
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
After container starts, I logged in to container to verify that certificate files appeared in /etc/ssl/nginx location:
/usr/share/zabbix $ cd /etc/ssl/nginx
/etc/ssl/nginx $ ls -la
total 24
drwxr-xr-x 2 root root 4096 Jan 25 18:56 .
drwxr-xr-x 1 root root 4096 Jan 25 18:53 ..
-r-------- 1 root root 769 Jan 25 18:56 dhparams.pem
-r-------- 1 root root 5282 Jan 25 18:56 ssl.crt
-r-------- 1 root root 1732 Jan 25 18:55 ssl.key
/etc/ssl/nginx $
/etc/ssl/nginx $ ls -la
total 24
drwxr-xr-x 2 root root 4096 Jan 25 18:56 .
drwxr-xr-x 1 root root 4096 Jan 25 18:53 ..
-r-------- 1 root root 769 Jan 25 18:56 dhparams.pem
-r-------- 1 root root 5282 Jan 25 18:56 ssl.crt
-r-------- 1 root root 1732 Jan 25 18:55 ssl.key
/etc/ssl/nginx $
********************
** Adding Zabbix virtual host (HTTP)
**** Impossible to enable SSL support for Nginx. Certificates are missed.
** Preparing Zabbix frontend configuration file
It used to work on a different installation with original set of compose files from zabbix, here we tried to simplify setup but I have no idea what else should be set.
Please chime in if you have any ideas.
Comment