2 Applications 1 certificate #9881
Unanswered
JHerwig
asked this question in
Questions (Nuxt 2)
Replies: 1 comment
-
I found a solution using a proxy (How to set proxy for different API server using Nuxt). I added @nuxtjs/proxy to my project. //nuxt.config.js
proxy: {
'/api': {
ws: true,
target: 'http://localhost:3001',
pathRewrite: {
'^/api': '', // remove base path
},
},
}, And setup my grarphql endpoint this way: graphql: {
clients: {
default: {
endpoint: 'http://localhost:3000/api',
},
},
}, If anyone has another idea don't hesitate to present. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not quite a nuxt.js question. But I think you can give me hints.
I am facing a critical problem. I have 2 applications (Nuxt Frontend & NodeJs Backend). Both using different ports.
But on the production server, we using Apache and have only 1 certificate.
Previously, we were planning to set up a reverse proxy which delegates
mydomain.com/api
andmydomain.com/*
to different ports. But according to my supervisor, this is not possible. (Not confirmed)Now I have to find a solution.
While googling I found something about
ProxyPass
, that disagree with my supervisor's statement and allow our previous plan.Another idea is the Linux keyword
SO_REUSEPORT
which allows applications to share one port.I am no system administrator and don't have deep knowledge.
Now is my question:
Does anyone of you already faced similar problems and have a solution or hints for me?
Beta Was this translation helpful? Give feedback.
All reactions