3

Is this much slower than direct Access?

RewriteEngine On
RewriteRule (.*) http://localhost:23232/$1 [P]

1 Answer 1

4

It wouldn't be much slower. It would only differ by the tiny fraction it takes for Apache to proxy your request which compared to the time it takes for Node.js to process your request is most likely even hard to measure.

However, you'd probably want to use ProxyPass and ProxyPassReverse instead of a rewrite so that Apache acts as a real proxy instead.

Sign up to request clarification or add additional context in comments.

4 Comments

Is it right, that i can`t do ProxyPass and ProxyPassReverse in .htaccess?
@raxer: Yeah, they are only available in the server config. For the .htaccess you can use the rewrite.
Thank you. Question is answered.
Just for completeness sake, I found a nice writeup of getting node working with apache here. Not my blog, so I'm not self-promoting, and the use of proxyPass as Marcus said, is preferred.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.