Node Js & Apache In Parallel?
I have written a Node JS server waiting to sit on a server. In an ideal world, I'd like to create a sub-domain which points to the Node server. I have seen articles that allow you
Solution 1:
Try this
1.- Create subdomain directory and put to it your plesk subdomain rootdir.
2.- Put there your dist
3.- Choose and change the NODE.js port (In your env variables (in /server/config) and open it in Firewall access rules in Parallels plesk
4.- Go to your subdomain in parallels plesk and Enter web Server config
5.- In the aditional directives for http, put this:
RewriteEngine on
RewriteCond %{SERVER_NAME} yoursub.domain.com
RewriteCond %{SERVER_PORT} !8750 <-- CHOOSE YOUR PORT NUMBER AND CHANGE
RewriteRule ^/(.*) http://yoursub.domain.com:8750/$1 [P,R]
RewriteCond %{SERVER_PORT} 8750 <-- CHOOSE YOUR PORT NUMBER AND CHANGE
RewriteRule ^/(.*) http://yoursub.domain.com:8750/$1 [P,L] <-- CHOOSE YOUR PORT NUMBER AND CHANGE
Then restart apache. And try it :) hope it helps and to not missing anything
EDIT To your answer about if there is any problem with apache before node.js. -> Not for me. Apache and node.js run great together. At least for me.
Post a Comment for "Node Js & Apache In Parallel?"