Forum Moderators: phranque

Message Too Old, No Replies

https.

         

vigaros

8:27 am on Oct 11, 2010 (gmt 0)

10+ Year Member



Hello,
I have the following configuration:

Listen 10.10.71.151:9080
Listen 10.10.71.151:9090

NameVirtualHost 10.10.71.151:9080
<VirtualHost 10.10.71.151:9080>
CustomLog /tmp/v1.log common
ServerName 10.10.71.151
<IfModule mod_weblogic.c>
<Location /console>
SetHandler weblogic-handler
WebLogicHost 10.10.71.151
WebLogicPort 7003
WLLogFile /tmp/log1.log
</Location>
</IfModule>
</VirtualHost>

NameVirtualHost 10.10.71.151:9090
<VirtualHost 10.10.71.151:9090>
CustomLog /tmp/v2.log common
ServerName 10.10.71.151
<IfModule mod_weblogic.c>
<Location /console>
SetHandler weblogic-handler
WebLogicHost 10.10.71.151
WebLogicPort 7001
WLLogFile /tmp/log2.log
</Location>
</IfModule>
</VirtualHost>

This configuration works on http. when I try to go to https, to "MatchExpression" both VirtualHost solves the same site.
Where is the error?
seems that the directive "MatchExpression" act globally ...

Listen 10.10.71.151:9080
Listen 10.10.71.151:9090

NameVirtualHost 10.10.71.151:9080
<VirtualHost 10.10.71.151:9080>
MatchExpression /console WebLogicHost=10.10.71.151|WebLogicPort=7003|PathTrim=/console
CustomLog /tmp/v1.log common
ServerName 10.10.71.151
<IfModule mod_weblogic.c>
<Location /console>
SetHandler weblogic-handler
WebLogicHost 10.10.71.151
WebLogicPort 7003
WLLogFile /tmp/log1.log
</Location>
</IfModule>
RewriteEngine On
RewriteLog /tmp/apache/rewrite.log
RewriteLogLevel 0

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) [esfinge.prepro.inversis.com...] [L,R]

</VirtualHost>

NameVirtualHost 10.10.71.151:9090
<VirtualHost 10.10.71.151:9090>
MatchExpression /console WebLogicHost=10.10.71.151|WebLogicPort=7001|PathTrim=/console

CustomLog /tmp/v2.log common
ServerName 10.10.71.151
<IfModule mod_weblogic.c>
<Location /console>
SetHandler weblogic-handler
WebLogicHost 10.10.71.151
WebLogicPort 7001
WLLogFile /tmp/log2.log
</Location>
RewriteEngine On
RewriteLog /tmp/apache/rewrite.log
RewriteLogLevel 0

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) [esfinge.prepro.inversis.com...] [L,R]

</IfModule>


</VirtualHost>



Is there another way to do this no policy "MatchExpresion?
My Apache version is 2.0.51

sublime1

3:50 am on Oct 12, 2010 (gmt 0)

10+ Year Member



Hi --

This question may or may not be one I can answer, but it would be very helpful if you could do three things: 1) use either the "pre" or "code" style tags to help retain indenting and other formatting, 2) try to describe the problem you're trying to solve in general terms at the beginning, and 3) add a more complete description to the subject of the post than "https".

Thanks!

Tom

vigaros

9:54 am on Oct 13, 2010 (gmt 0)

10+ Year Member



Hello
the problem is as follows. Given 2 urls identical, distinguished only by the port, each has a different backend server.

When I try to pass them on to https, if I use "MatchExpression" Both url's go to the same place.

The 2 url's are:

url1: [192.168.42.144...]

url2: [192.168.42.144:90...]

In the previous configuration I have set the VirtualHost definition I have.

thanks...

jdMorgan

3:05 pm on Oct 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The two rewriterules seem to rewrite non-SSL requests to the same hostname. Since Https uses port 443, both will then resolve to port 443 on that target host.

I am not familiar with the MatchExpression directive. Be sure that it is correctly-scoped and, if implemented by an add-on module, that it will be executed in the proper per-module sequence.

Jim

vigaros

10:17 am on Oct 14, 2010 (gmt 0)

10+ Year Member



Post fixed.

I moved the configuration of the location in httpd.conf to file ssl.conf, 2 VirtualHost ports 443 and 444, and now if it solves OK.

thank you all.

jdMorgan

1:52 pm on Oct 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for posting your solution!

Jim