-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to use the same domain multiple times with mod_md
When using mod_md to manage TLS certificates, a domain can only appear once as a parameter of a MDomain configuration. When a single node configue multiple Virtual Hosts to serve the same website on different IP Addresses or on different ports, and we want to use mod_md to manage the TLS certificate, the current code produce a MDomain entry in each virtual host, leading to configuration error and preventing apache from starting. This commit rework how the MDomain setting is emitted, and ensure it is only output once even if multiple Virtual Hosts configure the same domain.
- Loading branch information
Showing
4 changed files
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<%- | | ||
Variant[Boolean, String[1]] $mdomain, | ||
String[1] $servername, | ||
| -%> | ||
<%- if $mdomain { -%> | ||
<%- if $mdomain =~ String { -%> | ||
MDomain <%= $mdomain %> | ||
<%-} else {-%> | ||
MDomain <%= $servername %> | ||
<%- } -%> | ||
<% } -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters