添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.com for web application
  • www.example.com:8443 for plesk control panel
  • www.example.com/api/v1 for API
  • 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>

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .