C
C
coder4web2018-02-16 11:38:30
Nginx
coder4web, 2018-02-16 11:38:30

How to specify your server_name for nginx config in zabbix-docker?

Greetings!
I study docker in practice, there was a need at work, for a start I took the zabbix project . I rewrote the config for docker-compose to version 3, everything works.
Actually, it remains to set the server_name for nginx, while it is hardcoded in nginx.conf :
server_name zabbix;
That is, I cannot change it through the parameters.
The Dockerfile for building the web frontend specifies the connection of this config:
ADD conf/etc/zabbix/nginx.conf /etc/zabbix/
Due to a lack of knowledge, I have not yet figured out how to correctly specify the server_name (fully qualified domain name, for example zabbix.example.com) in order to access it from the outside.
While I see the option - create your own image based on the existing oneand add your config there. But after all, the Dockerfile already has the addition of a standard config, it is also not clear how it and the new config will coexist. Or are there other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coder4web, 2018-02-16
@kinozol

Yes, I liked the nginx-proxy approach, I will use it.
Decided through nginx proxy_pass from host to container.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question