Proxy

Topics: User Forum
Nov 23, 2010 at 3:18 PM

Hallo,

I'm new here and i want to use isapi rewrite.

I have installed it and the iirf status report is show me.

So i think the install was ok.

Now i want to proxy the url http://62.234.232.2/eodgewerbe to http://www.egt-eod.de

so i have write the following rule

 

 

# Iirf.ini
#
# Initial Global ini file for IIRF.
# This file must be placed in the same directory as the IIRF.dll.
# You can change the settings in this file.
#
# Tue, 24 Nov 2009  10:25


## ------------------------------------------------------------------
## RewriteEngine OFF|ON
##
## This is a simple directive that enables or disables the Rewriting
## capabilities of IIRF. It can be present in IirfGlobal.ini, or in
## Iirf.ini .
##
## In some cases you may want none of the rules in the ini file to be
## effective, but you also don't want to comment all the rules out. This
## directive provides a simple way to turn OFF the rewriting capability,
## temporarily, for a site, with a one-line configuration file change.
##
## By default this setting is ON.
##
RewriteEngine ON
RewriteLogLevel 5
IterationLimit 10
MaxMatchCount 10


StatusInquiry ON
RewriteLog c:\temp\iirf

ProxyPass             ^/eodgewerbe/(.*)$  http://www.egt-eod.de
ProxyPassReverse   /eodgewerbe            http://www.egt-eod.de

 

 

 

Now i have to try the url http://localhost/eodgewerbe but i doesn't happen everything.

I have everywhere an mistake but i dont know where.

Can you help me???!!!!!!

 

Coordinator
Nov 24, 2010 at 5:01 PM

Check the IIRF logfile in c:\temp\iirf*.log . If you cannot understand the logfile, post it here.  (It should be for just ONE request.  If you post a logfile that contains log messages for many requests, then it's harder to diagnose).

What, specifically, do you see when you use the url http://localhost/eodgewerbe ?   what happens? what http result do you get?  404?  403?  500? 

Nov 25, 2010 at 12:26 PM

Thank you for reply.

If i try the url http://localhost/eodgewerbe the browser show me the http result 404

In the Log i can see the following

Thu Nov 25 13:21:31 -  3032 - -------------------------------------------------------
Thu Nov 25 13:21:31 -  3032 - Ionic ISAPI Rewriting Filter (IIRF) 2.1.1.23 x86 RELEASE
Thu Nov 25 13:21:31 -  3032 - IIRF was built on: May 30 2010 13:26:57
Thu Nov 25 13:21:31 -  3032 - Cached: DLL_PROCESS_ATTACH
Thu Nov 25 13:21:31 -  3032 - Cached: Process ID: 2992
Thu Nov 25 13:21:31 -  3032 - Cached: ReadServerConfig: C:\Program Files\Ionic Shade\IIRF 2.1\IirfGlobal.ini(23): Filter Priority is now: HIGH (0x80000)
Thu Nov 25 13:21:31 -  3032 - Cached: ReadServerConfig: C:\Program Files\Ionic Shade\IIRF 2.1\IirfGlobal.ini(24): StatusInquiry setting is now: ON
Thu Nov 25 13:21:31 -  3032 - Cached: ReadServerConfig: C:\Program Files\Ionic Shade\IIRF 2.1\IirfGlobal.ini(49): NotifyLog setting is now: ON
Thu Nov 25 13:21:31 -  3032 - Cached: ReadServerConfig: C:\Program Files\Ionic Shade\IIRF 2.1\IirfGlobal.ini(66): RewriteEngine setting is now: ON
Thu Nov 25 13:21:31 -  3032 - Cached: DLL_PROCESS_ATTACH - complete
Thu Nov 25 13:21:31 -  3032 - Cached: GetFilterVersion
Thu Nov 25 13:21:31 -  3032 - GetLogFile: app:'/LM/W3SVC/1/ROOT'  new log:'c:\temp\iirf.2992.log'
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: actual log file 'c:\temp\iirf.2992.log'
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: ini file: 'c:\inetpub\wwwroot\Iirf.ini'
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: ini file timestamp: 2010/11/25 13:15:47 Central Europe Standard Time
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: cfg(0x01DE4228)
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: LogLevel = 5
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: pass 2
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(24): RewriteEngine will be enabled.
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(26): IterationLimit 10
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(27): MaxMatchCount 10
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(30): StatusInquiry ON (--) (--)
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(30): IIRF Status Inquiry is enabled at path '/iirfStatus' for local requests only.
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(33): ProxyPass (rule 1)  '^/eodgewerbe/(.*)$'  'http://www.egt-eod.de'   (null)
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: c:\inetpub\wwwroot\Iirf.ini(34): ProxyPassReverse   /eodgewerbe  http://www.egt-eod.de
Thu Nov 25 13:21:31 -  3032 - ReadVdirConfig: Done reading INI for the root vdir, found 1 rules (0 errors, 0 warnings) on 40 lines
Thu Nov 25 13:21:31 -  3032 - GetVdirConfig: Obtain  vdir '/LM/W3SVC/1/ROOT' (era=0) (rc=1) (Expired=0) (ptr=0x01DE4228)...
Thu Nov 25 13:21:31 -  3032 - HttpFilterProc: SF_NOTIFY_URL_MAP
Thu Nov 25 13:21:31 -  3032 - HttpFilterProc: cfg= 0x01DE4228
Thu Nov 25 13:21:31 -  3032 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Thu Nov 25 13:21:31 -  3032 - DoRewrites
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: getting 'url'
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: 12 bytes   ptr:0x000C6080
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: 'url' = '/eodgewerbe'
Thu Nov 25 13:21:31 -  3032 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Thu Nov 25 13:21:31 -  3032 - GetServerVariable_AutoFree: 1 bytes
Thu Nov 25 13:21:31 -  3032 - GetServerVariable_AutoFree: result ''
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: getting 'method'
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: 4 bytes   ptr:0x000C6190
Thu Nov 25 13:21:31 -  3032 - GetHeader_AutoFree: 'method' = 'GET'
Thu Nov 25 13:21:31 -  3032 - DoRewrites: New Url, before decoding: '/eodgewerbe'
Thu Nov 25 13:21:31 -  3032 - DoRewrites: Url (no decoding): '/eodgewerbe'
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: depth=0
Thu Nov 25 13:21:31 -  3032 - GetServerVariable: getting 'SCRIPT_NAME'
Thu Nov 25 13:21:31 -  3032 - GetServerVariable: 12 bytes
Thu Nov 25 13:21:31 -  3032 - GetServerVariable: result '/eodgewerbe'
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: no RewriteBase
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: Rule 1: pattern: ^/eodgewerbe/(.*)$  subject: /eodgewerbe
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: Rule 1: -1 (No match)
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: returning 0
Thu Nov 25 13:21:31 -  3032 - DoRewrites: No Rewrite
Thu Nov 25 13:21:31 -  3032 - HttpFilterProc: SF_NOTIFY_LOG
Thu Nov 25 13:21:31 -  3032 - ReleaseOrExpireVdirConfig: vdir '/LM/W3SVC/1/ROOT' (era=0) (rc=0) (Expired=0) (ptr=0x01DE4228)...
Thu Nov 25 13:22:11 -  3032 - IsIniFileUpdated: c:\inetpub\wwwroot\Iirf.ini NO
Thu Nov 25 13:22:11 -  3032 - GetVdirConfig: Obtain  vdir '/LM/W3SVC/1/ROOT' (era=0) (rc=1) (Expired=0) (ptr=0x01DE4228)...
Thu Nov 25 13:22:11 -  3032 - HttpFilterProc: SF_NOTIFY_URL_MAP
Thu Nov 25 13:22:11 -  3032 - HttpFilterProc: cfg= 0x01DE4228
Thu Nov 25 13:22:11 -  3032 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Thu Nov 25 13:22:11 -  3032 - DoRewrites
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: getting 'url'
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: 12 bytes   ptr:0x000C6460
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: 'url' = '/eodgewerbe'
Thu Nov 25 13:22:11 -  3032 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Thu Nov 25 13:22:11 -  3032 - GetServerVariable_AutoFree: 1 bytes
Thu Nov 25 13:22:11 -  3032 - GetServerVariable_AutoFree: result ''
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: getting 'method'
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: 4 bytes   ptr:0x000C6588
Thu Nov 25 13:22:11 -  3032 - GetHeader_AutoFree: 'method' = 'GET'
Thu Nov 25 13:22:11 -  3032 - DoRewrites: New Url, before decoding: '/eodgewerbe'
Thu Nov 25 13:22:11 -  3032 - DoRewrites: Url (no decoding): '/eodgewerbe'
Thu Nov 25 13:22:11 -  3032 - EvaluateRules: depth=0
Thu Nov 25 13:22:11 -  3032 - GetServerVariable: getting 'SCRIPT_NAME'
Thu Nov 25 13:22:11 -  3032 - GetServerVariable: 12 bytes
Thu Nov 25 13:22:11 -  3032 - GetServerVariable: result '/eodgewerbe'
Thu Nov 25 13:22:11 -  3032 - EvaluateRules: no RewriteBase
Thu Nov 25 13:22:11 -  3032 - EvaluateRules: Rule 1: pattern: ^/eodgewerbe/(.*)$  subject: /eodgewerbe
Thu Nov 25 13:22:11 -  3032 - EvaluateRules: Rule 1: -1 (No match)
Thu Nov 25 13:22:11 -  3032 - EvaluateRules: returning 0
Thu Nov 25 13:22:11 -  3032 - DoRewrites: No Rewrite
Thu Nov 25 13:22:11 -  3032 - HttpFilterProc: SF_NOTIFY_LOG
Thu Nov 25 13:22:11 -  3032 - ReleaseOrExpireVdirConfig: vdir '/LM/W3SVC/1/ROOT' (era=0) (rc=0) (Expired=0) (ptr=0x01DE4228)...

 

 

I hope you can help me

 

Thank's

Dec 1, 2010 at 10:04 AM

Hallo,

is nobody here how can help me?

Please help me, I don't know what I can do

 

Thanks

Coordinator
Dec 3, 2010 at 4:39 PM
Edited Dec 3, 2010 at 4:41 PM

yes, I can explain.

if you look in your log you will see two interesting lines:

Thu Nov 25 13:21:31 -  3032 - EvaluateRules: Rule 1: pattern: ^/eodgewerbe/(.*)$  subject: /eodgewerbe
Thu Nov 25 13:21:31 -  3032 - EvaluateRules: Rule 1: -1 (No match)

This tells you that the rule does not match the incoming URL.

And why not?  Look at the pattern:  it specifies that the string start with /eodgewerbe/  (note the trailing slash), followed by zero or more of anything.

Your incoming URL did not have the trailing slash.  Hence it was not rewritten, which gives you a 404.

 

Dec 6, 2010 at 10:14 AM

Thank you.

I have found the problem.

But now I have a secound problem.

The proxy work nice but in the request url is an addional statemant.

the correct header

https://local/webim/client.php?thread=143&token=44110420&level=ajaxed

but the statement looks

https://local/webim/client.php?thread=143&token=44110420&level=ajaxedContent-Lenght:%200

How can i fix this problem?

 

Thanks

 

Coordinator
Dec 14, 2010 at 3:43 PM

That sure looks like a bug in IIRF. It shouldn't be generating a URL like that.  Can you show me the IIRF logfile?