Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

configuring Apache on Mountain Lion proxying to Node.js

configuring Apache on Mountain Lion proxying to Node.js

Problem

I'm trying to get Apache on OSX 10.8.2 to proxy requests to a specific URL to a Node.js server running on port 8080 following this guide: http://garrows.com/?p=455
In order to do this, I add the following to apache2/users/george.conf:

ProxyRequests Off
ProxyPass /foo http://localhost:8080
ProxyPassReverse /foo http://localhost:8080

But with this added, apache wont start. In fact, as soon as I add even the 'ProxyRequests Off' directive, apache will no longer start. Is this the right place for this directive?

Problem courtesy of: Black

Solution

This works for me (I use port 3000 to connect to my own server here):


    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all



ProxyRequests Off
ProxyPass /foo http://localhost:3000
ProxyPassReverse /foo http://localhost:3000

But does not work if you place it inside .

To debug, you can run:

sudo apachectl configtest

This will tell you where there is an error in your config.

Solution courtesy of: Pascal Belloncle

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

configuring Apache on Mountain Lion proxying to Node.js

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×