nginx: added serverName option for virtualHosts

This allows overriding the `server_name` attribute of virtual
hosts. By doing so it is possible to have multiple virtualHost
definitions that share the same `server_name`. This is useful in
particular when you need a HTTP as well as a HTTPS virtualhost: same
server_name, different port.
This commit is contained in:
Bob van der Linden
2017-01-16 16:46:43 +01:00
committed by Robin Gloster
parent b9b95aa4d4
commit d9987f360a
2 changed files with 33 additions and 16 deletions

View File

@@ -8,6 +8,15 @@
with lib;
{
options = {
serverName = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Name of this virtual host. Defaults to attribute name in virtualHosts.
'';
example = "example.org";
};
serverAliases = mkOption {
type = types.listOf types.str;
default = [];