Archiv para Enero, 2016

How to deal with node and angular path behind of apache proxy

Escrito por aserrano. Posteado en Angular JS, Desarrollo, ExpressJS, Javascript, Node

I was setting up a server with apache and node.
Apache will redirect all requests from /api to node where an angular app should be work.

I was searching for a solution of this problem but I didn’t find it the right one.

Maybe this is not the better solution ever but It’s working for me.

The first step is prepare Apache to deal with proxy…like this.

Redirect /api /api/
            ProxyPass http://localhost:3100/
            ProxyPassReverse http://localhost:3100/

Apache will remove the “/api/” before requesting a page to the node server.

Nota legal

(C) Antonio Serrano 2012