Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom NGINX Config is ignored #6340

Open
5 tasks done
markus-gitdev opened this issue Feb 28, 2025 · 0 comments
Open
5 tasks done

Custom NGINX Config is ignored #6340

markus-gitdev opened this issue Feb 28, 2025 · 0 comments
Labels

Comments

@markus-gitdev
Copy link

markus-gitdev commented Feb 28, 2025

Contribution guidelines

I've found a bug and checked that ...

  • ... I understand that not following the below instructions will result in immediate closure and/or deletion of my issue.
  • ... I have understood that this bug report is dedicated for bugs, and not for support-related inquiries.
  • ... I have understood that answers are voluntary and community-driven, and not commercial support.
  • ... I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description

Custom NGINX configs are ignored when the mailcow.conf contains additional SANs (`ADDITIONAL_SAN`) and ENABLE_SNI is set to true (`ENABLE_SNI=y`).

Logs:

`docker compose exec -it nginx-mailcow nginx -t`


2025/02/28 11:43:16 [warn] 52#52: protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/listen_ssl.active:1
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/listen_ssl.active:1
2025/02/28 11:43:16 [warn] 52#52: conflicting server name "mta-sts.<domain>.<tld>" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "mta-sts.<domain>.<tld>" on 0.0.0.0:443, ignored
2025/02/28 11:43:16 [warn] 52#52: conflicting server name "mta-sts.<domain>.<tld>" on [::]:443, ignored
nginx: [warn] conflicting server name "mta-sts.<domain>.<tld>" on [::]:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Steps to reproduce:

Have a custom NGINX config for a domain that is used in `ÀDDITIONAL_SAN` and have `ENABLE_SNI` active.

Workaround (from FreddleSpl0it):
Change the file `data/conf/nginx/templates/nginx.conf.j2` so that the last `include /etc/nginx/conf.d/*.conf;` is above the code block `{% for cert in valid_cert_dirs %}`.

Which branch are you using?

master

Which architecture are you using?

x86

Operating System:

Ubuntu 22.04

Server/VM specifications:

Recommded Setup

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

KVM

Docker version:

28.0.1

docker-compose version or docker compose version:

v2.33.1

mailcow version:

2025-02

Reverse proxy:

Logs of git diff:

-

Logs of iptables -L -vn:

-

Logs of ip6tables -L -vn:

-

Logs of iptables -L -vn -t nat:

-

Logs of ip6tables -L -vn -t nat:

-

DNS check:

-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant