Issue
I need to deploy a Nuxt.js SSR web application on a centos server. Plesk control panel is already on the server so I need to proxy all requests from example.com to localhost:3000 except plesk control panel which is example.com:8443 and an API URL which is example.com/api/v1 (API is in the WWW folder). The Web server used is nginx.
I tried to use nginx proxy mode, but then I can't get access to API or plesk control panel anymore.
I expect to have 3 vhosts on one IP:
www.example.comfor web applicationwww.example.com:8443for plesk control panelwww.example.com/api/v1for API
Solution
For those with the same problem. this is how i solved it:
go to Plesk control panel/ websites and domain/ Apache and Nginx settings
in Additional Apache directives section you can add your apache code:
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
<Location /API/>
ProxyPass !
</Location>
Answered By - Pouria Answer Checked By - Timothy Miller (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.