RewriteProxy with Port
10 posts
• Page 1 of 1
- programmer27
- Posts: 7
- Joined: 23 Aug 2012, 21:09
RewriteProxy with Port
We are currently using Isapi_Rewrite 2.15..
I am trying to use RewriteProxy to proxy to another server with a specific port number, for some reason this is not working. I am able to use the same redirect using RewriteRule, but RewriteProxy gives me a 500 error.
Example:
RewriteProxy /test/here/([a-z0-9]+) http\://123.456.7.8\:123456/?RequestType=TryThis&ID=$1 [U,I,D]
it also doesn't work if i don't escape the colons.
also, i tested RewriteProxy without a port number, and it does work.
Thanks for your help.
I am trying to use RewriteProxy to proxy to another server with a specific port number, for some reason this is not working. I am able to use the same redirect using RewriteRule, but RewriteProxy gives me a 500 error.
Example:
RewriteProxy /test/here/([a-z0-9]+) http\://123.456.7.8\:123456/?RequestType=TryThis&ID=$1 [U,I,D]
it also doesn't work if i don't escape the colons.
also, i tested RewriteProxy without a port number, and it does work.
Thanks for your help.
Re: RewriteProxy with Port
Hello,
Please make sure you are using the latest build and if not, please upgrade to the latest version.
Also please specify the Windows version you are using. You may want to consider shifting to ISAPI_Rewrite 3, which is more advanced and is still supported (we are not making fixes to v2 for quite a while as it is an obsolete version).
Please make sure you are using the latest build and if not, please upgrade to the latest version.
Also please specify the Windows version you are using. You may want to consider shifting to ISAPI_Rewrite 3, which is more advanced and is still supported (we are not making fixes to v2 for quite a while as it is an obsolete version).
- programmer27
- Posts: 7
- Joined: 23 Aug 2012, 21:09
Re: RewriteProxy with Port
Thanks for responding.
I downloaded the ISAPI_Rewrite3_0104 32 bit version to our Windows 2000 machine.
I placed these rules in the httpd.conf and I still have the same problem.
I downloaded the ISAPI_Rewrite3_0104 32 bit version to our Windows 2000 machine.
I placed these rules in the httpd.conf and I still have the same problem.
Re: RewriteProxy with Port
Hello,
Please try to fix the rule a bit to correspond to v3 syntax:
RewriteBase
RewriteProxy ^/test/here/([a-z0-9]+) http://123.456.7.8:123456/?RequestType=TryThis&ID=$1 [NC]
If you need any additional flags, please check here: http://www.helicontech.com/isapi_rewrit ... eProxy.htm
Please try to fix the rule a bit to correspond to v3 syntax:
RewriteBase
RewriteProxy ^/test/here/([a-z0-9]+) http://123.456.7.8:123456/?RequestType=TryThis&ID=$1 [NC]
If you need any additional flags, please check here: http://www.helicontech.com/isapi_rewrit ... eProxy.htm
- programmer27
- Posts: 7
- Joined: 23 Aug 2012, 21:09
Re: RewriteProxy with Port
I changed to the NC flag (and added RewriteBase) and I still get the 500 error.
Re: RewriteProxy with Port
Hello,
Let me clarify several points:
- does the RewriteProxy rule work fine when without port?
- Can you access the destination URL directly from the browser?
- please enable logging in httpd.conf by putting
RewriteLogLevel 9
and provide rewrite.log records for your test request.
Let me clarify several points:
- does the RewriteProxy rule work fine when without port?
- Can you access the destination URL directly from the browser?
- please enable logging in httpd.conf by putting
RewriteLogLevel 9
and provide rewrite.log records for your test request.
- programmer27
- Posts: 7
- Joined: 23 Aug 2012, 21:09
Re: RewriteProxy with Port
The destination url does work when I go directly to it in my browser.
I turned on logging: First one is with the port, and second is without (which works successfully).
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) init rewrite engine with requested uri /thisOne/doSomething/id246
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/httpd(?:\.ini|\.parse\.errors).*' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '.*\.isrwhlp' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/thisOne/doSomething/([a-z0-9]+)' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) forcing proxy-throughput with http://192.168.1.5:123/?RequestType=DoS ... derID=1234
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) go-ahead with proxy request http://192.168.1.5:123/?RequestType=DoS ... derID=1234 [OK]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) Rewrite URL to >> /thisOne/doSomething/id246x.rwhlp?p=0
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) rewrite '/thisOne/doSomething/id246' -> '/thisOne/doSomething/id246x.rwhlp?p=0'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) internal redirect with /thisOne/doSomething/id246x.rwhlp?p=0 [INTERNAL REDIRECT]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) init rewrite engine with requested uri /test/hello
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/httpd(?:\.ini|\.parse\.errors).*' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '.*\.isrwhlp' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/thisOne/doSomething/([a-z0-9]+)' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/test/hello' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) forcing proxy-throughput with http://www.adorama.com/wertyu.html
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) go-ahead with proxy request http://www.adorama.com/wertyu.html [OK]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) Rewrite URL to >> /test/hellox.rwhlp?p=0
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) rewrite '/test/hello' -> '/test/hellox.rwhlp?p=0'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) internal redirect with /test/hellox.rwhlp?p=0 [INTERNAL REDIRECT]
I turned on logging: First one is with the port, and second is without (which works successfully).
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) init rewrite engine with requested uri /thisOne/doSomething/id246
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/httpd(?:\.ini|\.parse\.errors).*' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '.*\.isrwhlp' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/thisOne/doSomething/([a-z0-9]+)' to uri '/thisOne/doSomething/id246'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) forcing proxy-throughput with http://192.168.1.5:123/?RequestType=DoS ... derID=1234
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) go-ahead with proxy request http://192.168.1.5:123/?RequestType=DoS ... derID=1234 [OK]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (1) Rewrite URL to >> /thisOne/doSomething/id246x.rwhlp?p=0
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) rewrite '/thisOne/doSomething/id246' -> '/thisOne/doSomething/id246x.rwhlp?p=0'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:15:29 GMT [localhost/sid#1][rid#20258456/initial] (2) internal redirect with /thisOne/doSomething/id246x.rwhlp?p=0 [INTERNAL REDIRECT]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) init rewrite engine with requested uri /test/hello
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/httpd(?:\.ini|\.parse\.errors).*' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '.*\.isrwhlp' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/thisOne/doSomething/([a-z0-9]+)' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (3) applying pattern '/test/hello' to uri '/test/hello'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) forcing proxy-throughput with http://www.adorama.com/wertyu.html
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) go-ahead with proxy request http://www.adorama.com/wertyu.html [OK]
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (1) Rewrite URL to >> /test/hellox.rwhlp?p=0
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) rewrite '/test/hello' -> '/test/hellox.rwhlp?p=0'
127.0.0.1 127.0.0.1 Tue, 24-Jun-2014 08:18:11 GMT [localhost/sid#1][rid#20258456/initial] (2) internal redirect with /test/hellox.rwhlp?p=0 [INTERNAL REDIRECT]
Re: RewriteProxy with Port
Hello,
Please try to do the following:
- put
<Helicon>
ProxySuppressErrors Off
</Helicon>
in httpd.conf to enable more verbose error messages. And show what your 500 error will tell.
- try to request the URL with the port from your SERVER, not from your local machine.
- try to use the port number bigger than 1024.
Please try to do the following:
- put
<Helicon>
ProxySuppressErrors Off
</Helicon>
in httpd.conf to enable more verbose error messages. And show what your 500 error will tell.
- try to request the URL with the port from your SERVER, not from your local machine.
- try to use the port number bigger than 1024.
- programmer27
- Posts: 7
- Joined: 23 Aug 2012, 21:09
Re: RewriteProxy with Port
this is the error i see in the browser:
Error in ISAPI_Rewrite helper ISAPI extension.
12152 - The server returned an invalid or unrecognized response
File: AsyncProxy.cpp, Line: 219.
Internal Error
I am requesting the url from my server
the port I am trying is 60001
Error in ISAPI_Rewrite helper ISAPI extension.
12152 - The server returned an invalid or unrecognized response
File: AsyncProxy.cpp, Line: 219.
Internal Error
I am requesting the url from my server
the port I am trying is 60001
Re: RewriteProxy with Port
Hello,
Well it didn't help much.
Please install wFetch on your server and make your direct request (without proxy) via wFetch.
And send us the response from the server.
We'll investigate what proxy can consider invalid or unrecognized.
Well it didn't help much.
Please install wFetch on your server and make your direct request (without proxy) via wFetch.
And send us the response from the server.
We'll investigate what proxy can consider invalid or unrecognized.
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests