Re: Making HTTP requests
I am using CURL. On Mon, Jun 1, 2009 at 9:01 PM, Michael Spiegle m...@nauticaltech.com wrote: Is there a proper/defined way to use mod_proxy for this, or should I just move forward with cURL? -- Marko Kevac
Fwd: Making HTTP requests
Heh. Lost in the ether (again). Begin forwarded message: From: Nick Kew n...@webthing.com Date: 1 June 2009 21:10:26 BDT To: modules-dev@httpd.apache.org Subject: Re: Making HTTP requests Michael Spiegle wrote: I'm writing a module where I need the ability to make HTTP requests to servers on my backend for business logic. Just to get my code working, I wrote a very simple HTTP client library but it only handles basic HTTP/1.0 requests and only checks for return codes 200 and 404. I'd like to use a better codebase for making my requests, but am not sure what my options are. I looked to see if I could abuse the mod_proxy code, but I don't think it was meant to be used this way and don't want my code to break due to changes upstream. I was thinking about using cURL, but that would add another dependency to my code. Is there a proper/defined way to use mod_proxy for this, or should I just move forward with cURL? Your module has two basic options. It can either turn the request into a proxy request and do [whatever else] around it - c.f. mod_rewrite. Or it can make subrequests to be proxied, as in mod_include. The latter requires a bit of configuration: you make a subrequest into URL space defined by a ProxyPass (or RewriteRule). -- Nick Kew
do I need a custom proxy?
I do develop Apache Modules which is why I thought to ask this question here... I run a micro ISV out of my home and I only have one external IP address. I need to have some services on Apache and others on IIS. How would I pull this off since I only have one external IP address? My thought is create a custom mod_proxy that will redirect some URL's from the public facing Apache to the internal IIS. Is this the correct approach or is there an approach that does not require actual development? Sam
Re: do I need a custom proxy?
On Tue, Jun 2, 2009 at 14:45, Sam Carleton scarle...@miltonstreet.com wrote: I do develop Apache Modules which is why I thought to ask this question here... I run a micro ISV out of my home and I only have one external IP address. I need to have some services on Apache and others on IIS. How would I pull this off since I only have one external IP address? My thought is create a custom mod_proxy that will redirect some URL's from the public facing Apache to the internal IIS. Is this the correct approach or is there an approach that does not require actual development? Can't you create two virtual hosts or two locations on your apache, one of them handling requests and the other forwarding them to IIS? Something like VirtualHost * ServerName apache.my-domain.org /VirtualHost VirtualHost * ServerName iis.my-domain.org ProxyPass / http://internal-IP-of-IIS-server/ /VirtualHost and you register apache.my-domain.org and iis.my-domain.org as having the same IP address in the authoritative nameserver of my-domain.org. or Location /apache /Location Location /iis ProxyPass http://internal-IP-of-IIS-server/ /Location S -- A: Because it reverses the logical flow of conversation. Q: Why is top-posting frowned upon? A: Top-posting. Q: What is the most annoying thing in e-mail?
Re: do I need a custom proxy?
I did not mention that I am only interested in HTTPS, not HTTP. It is my understanding that virtual host's don't work for HTTPS, is this correct? Sorin Manolache wrote: On Tue, Jun 2, 2009 at 14:45, Sam Carleton scarle...@miltonstreet.com wrote: I do develop Apache Modules which is why I thought to ask this question here... I run a micro ISV out of my home and I only have one external IP address. I need to have some services on Apache and others on IIS. How would I pull this off since I only have one external IP address? My thought is create a custom mod_proxy that will redirect some URL's from the public facing Apache to the internal IIS. Is this the correct approach or is there an approach that does not require actual development? Can't you create two virtual hosts or two locations on your apache, one of them handling requests and the other forwarding them to IIS? Something like VirtualHost * ServerName apache.my-domain.org /VirtualHost VirtualHost * ServerName iis.my-domain.org ProxyPass / http://internal-IP-of-IIS-server/ /VirtualHost and you register apache.my-domain.org and iis.my-domain.org as having the same IP address in the authoritative nameserver of my-domain.org. or Location /apache /Location Location /iis ProxyPass http://internal-IP-of-IIS-server/ /Location S
RE: do I need a custom proxy?
Not entirely. You could also either use a wildcard certificate (although IE doesn't support dots in the wildcard portion) or exclusively support the vhosts on modern browsers running TLS. Thanks, Rick Houser Auto-Owners Insurance Systems Support (517)703-2580 From: Sam Carleton [mailto:scarle...@gmail.com] Sent: Tuesday, June 02, 2009 9:44 AM To: modules-dev@httpd.apache.org Subject: Re: do I need a custom proxy? I did not mention that I am only interested in HTTPS, not HTTP. It is my understanding that virtual host's don't work for HTTPS, is this correct? Sorin Manolache wrote: On Tue, Jun 2, 2009 at 14:45, Sam Carleton scarle...@miltonstreet.com mailto:scarle...@miltonstreet.com wrote: I do develop Apache Modules which is why I thought to ask this question here... I run a micro ISV out of my home and I only have one external IP address. I need to have some services on Apache and others on IIS. How would I pull this off since I only have one external IP address? My thought is create a custom mod_proxy that will redirect some URL's from the public facing Apache to the internal IIS. Is this the correct approach or is there an approach that does not require actual development? Can't you create two virtual hosts or two locations on your apache, one of them handling requests and the other forwarding them to IIS? Something like VirtualHost * ServerName apache.my-domain.org /VirtualHost VirtualHost * ServerName iis.my-domain.org ProxyPass / http://internal-IP-of-IIS-server/ /VirtualHost and you register apache.my-domain.org and iis.my-domain.org as having the same IP address in the authoritative nameserver of my-domain.org. or Location /apache /Location Location /iis ProxyPass http://internal-IP-of-IIS-server/ /Location S
Re: do I need a custom proxy?
You could of course run one serer on a non standard port. -- Ray B. Morris supp...@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 06/02/2009 07:45:03 AM, Sam Carleton wrote: I do develop Apache Modules which is why I thought to ask this question here... I run a micro ISV out of my home and I only have one external IP address. I need to have some services on Apache and others on IIS. How would I pull this off since I only have one external IP address? My thought is create a custom mod_proxy that will redirect some URL's from the public facing Apache to the internal IIS. Is this the correct approach or is there an approach that does not require actual development? Sam
Re: do I need a custom proxy?
Ray Morris wrote: You could of course run one serer on a non standard port. Yes, except that there are many many access points out there that ONLY allow port 80 and 443 out, if I used a different port for one of the servers, than it would be blocked from such places.