Routing Node.js in Apache


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <VirtualHost *:80>
  2. ServerName www.your-domain.com
  3. ProxyPreserveHost on
  4. ProxyPass /cp http://localhost:5678/cp
  5. ProxyPass /db/ http://localhost:5984/
  6. </VirtualHost>
  7.  
  8. or
  9.  
  10. <VirtualHost *:80>
  11. ServerName www.your-domain.com
  12. RewriteRule ^/(cp|db/|static/|www/)(.*)$ http://localhost:5678/$1$2 [P]
  13. <VirtualHost>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.