use strict;
use autodie;
-my @domains = @ARGV;
+my @domains = map { s{^https://}{}; s{/+$}{}; $_ } @ARGV;
open(my $fh, '>', "providers/$domains[0].conf");
ServerName ${domain}.p.vbz.ffzg.hr
+ RewriteEngine on
+ # fix broken chunging
+ #RewriteRule /common/javascript/extjs/ext-all.js https://${domain}/common/javascript/extjs/ext-all.js [R,L]
+
SSLProxyEngine on
ProxyAddHeaders Off
ProxyPass / https://${domain}/
#Header edit* Set-Cookie "(.*)(?i:; *secure)" "\$1"
};
+print $fh qq{# if there are problems, remove traling /\n};
foreach ( @domains ) {
print $fh qq{\tHeader edit* Location "https://$_/" "https://$_.p.vbz.ffzg.hr/"\n};
}