just trying to set up a couple of working directories with mod_cfml on windows with apache 2.4
<Directory "c:/www/one/">
Options Indexes FollowSymLinks
DirectoryIndex index.cfm
AllowOverride All
Require all granted
</Directory>
Listen 81
<VirtualHost *:81>
ServerName zac-test-one
DirectoryIndex index.cfm
DocumentRoot "C:/www/one/"
<Proxy *>
#Require host 127.0.0.1
</Proxy>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2
</VirtualHost>
<Directory "c:/www/two/">
Options Indexes FollowSymLinks
DirectoryIndex index.cfm
AllowOverride All
Require all granted
</Directory>
Listen 82
<VirtualHost *:82>
ServerName zac-test-two
DirectoryIndex index.cfm
DocumentRoot "C:/www/two/"
<Proxy *>
#Require host 127.0.0.1
</Proxy>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2
</VirtualHost>
as you can see below, unique X-Tomcat-DocRoot / X-Webserver-Context combinations are generated
URI => /one.cfm, filename => proxy:ajp://localhost/one.cfm
Incoming header [Host] => localhost:81
Incoming header [Connection] => keep-alive
Incoming header [Cache-Control] => max-age=0
Incoming header [User-Agent] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3225.0 Safari/537.36
Incoming header [Upgrade-Insecure-Requests] => 1
Incoming header [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Incoming header [DNT] => 1
Incoming header [Accept-Encoding] => gzip, deflate, br
Incoming header [Accept-Language] => en-AU,en;q=0.9,en-US;q=0.8,de;q=0.7
Incoming header [X-Tomcat-DocRoot] => C:/www/one/
Incoming header [X-Webserver-Context] => zac-test-one-httpd-confl554
Handler Pattern Found => .cfm
Pattern Match TRUE: extension [.cfm] matches handler [.cfm]
Handler Pattern Found => .cfc
Handler Pattern Found => .cfml
URI => /two.cfm, filename => proxy:ajp://localhost/two.cfm
Incoming header [Host] => localhost:82
Incoming header [Connection] => keep-alive
Incoming header [Cache-Control] => max-age=0
Incoming header [User-Agent] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3225.0 Safari/537.36
Incoming header [Upgrade-Insecure-Requests] => 1
Incoming header [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Incoming header [DNT] => 1
Incoming header [Accept-Encoding] => gzip, deflate, br
Incoming header [Accept-Language] => en-AU,en;q=0.9,en-US;q=0.8,de;q=0.7
Incoming header [X-Tomcat-DocRoot] => C:/www/two/
Incoming header [X-Webserver-Context] => zac-test-two-httpd-confl575
but which ever virtual host gets the first request, the second one just ends up serving from the first host's docroot? have i missed something obvious?