You are not logged in. Please login at www.codechef.com to post your questions!

×

Apache2 php config with proxypass for nodejs

Hi Guys,

I am new to Node.js developer. I have and apache2 config vhost like this below using https: DocumentRoot as u can see is in "/var/www/html/wp" , which contain php api. My nodejs api runs on which is proxied to /ft/ where my nodejs files are stored . This nodejs api has routes like /api/login , /api/docs, /api/docs/import , etc .

<virtualhost *:443=""> ServerName domain.name.com DocumentRoot /var/www/html/wp

<Proxy *>
        Require all granted
</Proxy>

<Location /ft/>
ProxyPass http://localhost:9000/
ProxyPassReverse http://localhost:9000/
</Location>

<Directory "/var/www/html">
   Options FollowSymLinks
   AllowOverride none
   Require all granted
</Directory>
...

</virtualhosts> I have trying adding a new location like:

<Location /api/>
 ProxyPass http://localhost:9000/
 ProxyPassReverse http://localhost:9000/
</Location>

But this doesnt seem to make this routes works . anything you can see I missed?. Please keep in mind I would like to keep my nodejs api stored in "/var/www/html/ft/".

Thanks & Regards

Camillelola

asked 05 Dec, 12:38

camillelola's gravatar image

0★camillelola
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×11
×1

question asked: 05 Dec, 12:38

question was seen: 23 times

last updated: 05 Dec, 12:38