Apache2 php config with proxypass for nodejs

apache
nodejs

#1

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>
...
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