Simple Apache Proxying
I was recently working with Apache and a service running on Kris Zyp's Persevere project (which is beyond awesome). Persevere was pushing messages to my application which was running on Apache; the problem was that Persevere and Apache were running on different ports which technically made them cross-domain. In order to make the server believe the web service was on the same domain/port, I needed to use Apache proxying. I opened the conf/httpd.conf file and added the following magic to make that possible:
# Proxy requests to /data to persevere
ProxyPass /service http://localhost:8080/Status
ProxyPassReverse /service/ http://localhost:8080/Status
RewriteRule ^/service$ http://localhost:8080/Status$1 [P,L]
Now any reference to the directory "/Status" is proxied to the other port to receive the data! Apache proxying is a huge boost to your web application if you can trust the other domain/port.
![Create Namespaced Classes with MooTools]()
MooTools has always gotten a bit of grief for not inherently using and standardizing namespaced-based JavaScript classes like the Dojo Toolkit does. Many developers create their classes as globals which is generally frowned up. I mostly disagree with that stance, but each to their own. In any event...
![CSS @supports]()
Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn't been available within CSS. What we end up doing is repeating the same properties multiple times with each browser prefix. Yuck. Another thing we...
![Create Twitter-Style Dropdowns Using MooTools]()
Twitter does some great stuff with JavaScript. What I really appreciate about what they do is that there aren't any epic JS functionalities -- they're all simple touches. One of those simple touches is the "Login" dropdown on their homepage. I've taken...
![Multiple Backgrounds with CSS]()
Anyone that's been in the web development industry for 5+ years knows that there are certain features that we should have had several years ago. One of those features is the HTML5 placeholder; we used JavaScript shims for a decade before placeholder came...
Not getting…. :-(
I don’t remember for sure, but off the top of my head don’t you have to enable the proxy module as well?
Good call Alan, you absolutely do.
That’s one of the best uses for apache proxying I’ve seen! Awesome!