public-access-proxy: match by host end
This commit is contained in:
parent
dbccd2df17
commit
1327f465de
|
@ -81,7 +81,7 @@
|
|||
};
|
||||
}
|
||||
{
|
||||
hostNames = [ "vps1.nixvita.de" "*.vps1.www.nixvita.de" "vps1.codetu.be" "*.vps1.codetu.be" ];
|
||||
hostNames = [ "vps1.nixvita.de" "vps1.codetu.be" ];
|
||||
proxyTo = {
|
||||
host = "172.20.73.51";
|
||||
httpPort = 80;
|
||||
|
|
|
@ -100,7 +100,7 @@ in {
|
|||
optionalString
|
||||
(proxyHost.hostNames != [ ] && proxyHost.proxyTo.host != null)
|
||||
(concatMapStringsSep "\n" (hostname: ''
|
||||
use-server ${withoutWildcards hostname}-http if { req.hdr(host) -i ${hostname} }
|
||||
use-server ${withoutWildcards hostname}-http if { req.hdr(host) -i -m end ${hostname} }
|
||||
server ${withoutWildcards hostname}-http ${proxyHost.proxyTo.host}:${
|
||||
toString proxyHost.proxyTo.httpPort
|
||||
} weight 0
|
||||
|
@ -119,7 +119,7 @@ in {
|
|||
optionalString
|
||||
(proxyHost.hostNames != [ ] && proxyHost.proxyTo.host != null)
|
||||
(concatMapStringsSep "\n" (hostname: ''
|
||||
use-server ${withoutWildcards hostname}-https if { req.ssl_sni -i ${hostname} }
|
||||
use-server ${withoutWildcards hostname}-https if { req.ssl_sni -i -m end ${hostname} }
|
||||
server ${withoutWildcards hostname}-https ${proxyHost.proxyTo.host}:${
|
||||
toString proxyHost.proxyTo.httpsPort
|
||||
} weight 0
|
||||
|
|
Loading…
Reference in New Issue