| Author |
|
cjconrad Newbie

Joined: 13 February 2005 Location: United States
Online Status: Offline Posts: 14
|
| Posted: 11 August 2008 at 8:16pm | IP Logged
|
|
|
I have had prior releases of ISAPI (2.6, 2.8 and now 3.x), and got some of the features to work -- others I just couldn't spend more time on, and let it ride (I am sure the product could do what I needed, but I just couldn't figure it out in reasonable time).
No I just upgraded to the latest Pro version, and I really want to get it all working this time. I am likely to ask some "stupid" questions, so please be patient with me.
First, I want to do what I think is a simple Reverse Proxy. I have Windows 2003 Server, IIS 6, with two internet-registered domains coming to the server (via my router). I have established a separate IIS Web Site for each of these domains, both under the same IIS on the server, with each using a different port, of course. I want ISAPI-RW to use the headers to determine which site to proxy.
If one site is "site1.com", using port 850, then the statements in httpd.conf I use are:
RewriteBase /
RewriteCond %{HTTP_HOST} ^(?:www\.)?site1\.com$ [NC]
RewriteRule ^/?$ http://127.0.0.1:850 [NC,P]
This works well to show the main page, but the images aren't loading consistently. It's odd, but some (not all) load in Firefox, while others (not all) load when using IE. In any case, it appears that my rules aren't properly proxying the subfolder/filenames.
I am sure this is something simple for those that understand the matching syntax (it is very foreign to me!). Thank you in advance for any assistance.
(When I have this resolved, I will move on to the next challenge -- there are three in total, though the solution to the above might address one of those).
Craig
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4840
|
| Posted: 12 August 2008 at 5:07am | IP Logged
|
|
|
Please try to use this config:
RewriteBase /
RewriteCond %{HTTP_HOST} ^(?:www\.)?site1\.com$ [NC]
RewriteCond %{REQUEST_URI} !-f RewriteCond %{REQUEST_URI} !-d RewriteRule ^(.*)$ http://127.0.0.1:850/$1 [NC,P]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
cjconrad Newbie

Joined: 13 February 2005 Location: United States
Online Status: Offline Posts: 14
|
| Posted: 12 August 2008 at 2:05pm | IP Logged
|
|
|
Thanks for the quick response. At first, it didn't work. Then I realized that your recommendation was IN ADDITION TO what I already had. With these additions, it loads the correct JPG files fine in both Firefox and IE, but only Firefox loads the GIF file identified in the HTML.
Any further changes I can make to support the GIFs (or anything else that a site might commonly use)? Isn't there a simple way to proxy EVERYTHING that is destined for "site1.com" to "127.0.0.1:850", regardless of anything appearing after the ".com" (e.g. folders, files, parm strings, etc)?
Thanks in advance .... Craig
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 4840
|
| Posted: 13 August 2008 at 5:09am | IP Logged
|
|
|
Here's the rule to proxy everything:
RewriteBase /
RewriteCond %{HTTP_HOST} ^(?:www\.)?site1\.com$ [NC]
RewriteRule ^(.*)$ http://127.0.0.1:850/$1 [NC,P]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
cjconrad Newbie

Joined: 13 February 2005 Location: United States
Online Status: Offline Posts: 14
|
| Posted: 13 August 2008 at 10:32am | IP Logged
|
|
|
Anton,
Thank you very much -- that seems to work (and is much simpler). I am still having a difference in loading GIF files between Firefox and IE, but I don't know if it relates to ISAPI-RW or not. For now, I am satisfied with this issue.
This seems like something that would be commonly needed by your customers, and should be a highlighted example (I didn't see it).
Thanks again ... Craig
|
| Back to Top |
|
| |
|
|