My team and I are new to node.js and are currently working on our first project. We've run into an issue when deploying the project to our test server.
We are trying to run the application on our primary domain, which currently hosts a number of websites built in ColdFusion and Plone. We use Apache server to proxy these various sites. We are attempting to do the same with our Node application.
When we run the application directly on our test server, it works fine: e.g.
http://servername:3000.
In order to view the application off our VPN, we set up an Apache proxy to our public-facing test URL:
http://www.testdomain.com/calendar. The application runs, but none of our CSS or JS files show up. They are all 404ing in the debugging console, showing up as
http://www.testdomain.com/css/layout.css instead of
http://www.testdomain.com/calendar/css/layout.css.
We've found that if we add /calendar to the CSS and JS paths in the layout.jade file, it works. But we're wondering if there is a way to set up our Apache proxy so that it only proxies the front-end pages and not the internal CSS and JS folders. The other problem is that we also have JS files at the root of our application, so we would likely have to proxy ignore those files individually as well.
We attempted to use connect-modrewrite to fix the issue, but that just caused us more problems.
Any help would be appreciated. Thanks!