![]() |
![]() |
|
![]() |
Proxying for Paradox Using Apache v2.0.35 for Windows © 2002 Tony McGuire [Editor's note: While this document mentions proxying to the Corel Web Server OCX, you could proxy to any web server (as far as I know), and so this is not necessarily specific to using the OCX.] Introduction, Disclaimers, Initial Setup The version I address here is specifically 2.0.35, for Windows. I do not know whether this applies to earlier versions of Apache. There are differences between the information I give here and Apache for Linux. See the bottom of this article for links to information on setting up proxying for Paradox using Apache for Linux. I am not an expert on Apache, nor on setting up a Proxy. However, I'm going through the process of installing and configuring both of these; I thought my experiences might help someone else preparing to install and set this up. You can download Apache from:http://www.apache.org/dist/httpd/binaries/win32/. I strongly recommend the .msi version. It gives you an installer which sets up Apache on your system. The zip file appeared to be more of a manual configuration situation. When the installer asked what name I would be using for my site, I entered localhost as the name since this was a testbed install. For IP address I entered 127.0.0.1, which means 'this machine'. Again, I intended this as a test only. Neither of these settings have impacted testing. The main configuration file is httpd.conf, and it contains entries for these settings. You can open it with a text editor and make whatever changes are required. Searching 'localhost', I found an entry 'ServerName', which was set to 'localhost:80'. There are also a bunch of entries within various Configuring Apache This information applies to changes you can/should make to httpd.conf. First, I located the following three lines and removed the '#' sign from the front of each line. '#' is the character used to comment a line, as semicolon is in Paradox. LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_http_module modules/mod_proxy_http.soNext, the ifModule section for proxying needs to be 'uncommented'. This turns proxying on, and limits where proxying can be activated from. I use 127.0.0.1 as the 'allow from' IP address. This just says 'allow proxying requests to originate from this machine only'. <IfModule mod_proxy.c> ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from 127.0.0.1 </Proxy>For the actual proxying, you need to set your Apache system up to match the incoming requests. There has to be a way within the incoming requests for Apache to recognize a string that it should 'redirect' to somewhere else. Below, Apache is watching for /pdx/ and /pdx, and will redirect GETs or POSTs to another machine or IP/port. In the below statements, the incoming requests are just going to the same machine as Apache is installed on, port 8000; I have the OCX in Paradox listening on port 8000. ProxyPass says "Trap incoming requests that contain /pdx/ and send them to http://127.0.0.1:8000/" A good explanation of this can be found at: http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass ProxyPass /pdx/ http://127.0.0.1:8000/So, suppose your main site being handled by Apache is http://www.thedbcommunity.com. A POST request comes in for http://www.thedbcommunity.com/pdx/POSTDATA. Apache would send this POST to http://127.0.0.1:8000/POSTDATA Since Paradox/OCX is listening on port 8000, it would get this request. The URI Paradox would see would be POSTDATA, not /pdx/POSTDATA. ProxyPassReverse traps responses from the above going back to the user's browser, and causes the user's browser to think the response is coming back from the same Web server it sent the original request to. (The user doesn't see '8000' or know there was another Web server involved in formulating the response.) ProxyPassReverse /pdx/ http://127.0.0.1:8000/In the above example, when Paradox sent the response, it would go back through Apache. The user would not know that the reply came from Paradox on port 8000. A good explanation of this can be found at: http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypassreverse SSL and Installing Apache How about SSL, you ask? Yes, you can get SSL functionality for Paradox using Apache. There are several posts about this on the -web newsgroup at news://pnews.thedbcommunity.com/pnews.paradox-web. Most notably, Thad Van Ry shows his configuration for SSL and Paradox. And Dennis Santoro has an article on his site, http://www.rdaworldwide.com/pdoxres.htm. Both of these show the setup for Apache on Linux. There are some differences from Apache on Win32, but they are well worth the read in getting started. Conclusion The intent of this article is solely to help get proxying with Apache set up. It is not intended as a 'How to Install Apache' primer. However, using the .msi version to install makes that a very simple and straightforward proposition. It took longer to download the Apache install file (56k dialup) than to figure out how to install and configure it for basic operation. Hopefully, the above can get you up and running with Apache, Proxying, and Paradox w/OCX. Discussion of this article |
![]() Feedback | Paradox Day | Who Uses Paradox | I Use Paradox | Downloads ![]() |
|
![]() The information provided on this Web site is not in any way sponsored or endorsed by Corel Corporation. Paradox is a registered trademark of Corel Corporation. ![]() |
|
![]() Modified: 15 May 2003 Terms of Use / Legal Disclaimer ![]() |
![]() Copyright © 2001- 2003 Paradox Community. All rights reserved. Company and product names are trademarks or registered trademarks of their respective companies. Authors hold the copyrights to their own works. Please contact the author of any article for details. ![]() |
![]() |
|