Re: Re: Virtual host macros and reverse proxy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 29, 2020 at 10:25 AM Gillis J. de Nijs
<gillis@xxxxxxxx.invalid> wrote:
> <If> works at request time, so that might be useful for picking the port to forward to, but in my opinion it's not that useful for creating a configuration.  For example, it wouldn't allow you to choose the ports to listen on.  I'm also not sure it would work correctly with ProxyPass and ProxyPassReverse.  I'd probably just use mod_macro, or generate the configuration offline.

I've modified the macro to use reverse proxies. Take a look at this:

  https://github.com/tbrowder/apache-httpd-tidbits/blob/master/conf/vhost-proxy.macro.conf

-Tom

> On Wed, Jan 29, 2020 at 4:05 PM Tom Browder <tom.browder@xxxxxxxxx> wrote:
>>
>> On Wed, Jan 29, 2020 at 08:36 Gillis J. de Nijs <gillis@xxxxxxxx.invalid> wrote:
>> >
>> > There's mod_macro that might be useful.  I don't think it does calculations, though, so you might need to do some things yourself.  Maybe you could indeed generate the conf files yourself and use Include or IncludeOptional.
>>
>> ...
>>
>> Thanks, Gillis. After I "pinged" this morning I checked the docs again
>> and I think I can use if/else directives inside the macro, something
>> like this pseudo code:
>>
>>     <if domain.tld = foo.org>
>>         $port = 16000
>>     </if>
>>     <elseif domain.tld = bar.com>
>>         $port = 16100
>>     </elsif>
>>     <else>
>>         $port = 16800
>>    </else>
>>
>> What do you think?
>>
>> -Tom
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux