Just a quick question, trying to set up on the ser...
# support-questions
c
Just a quick question, trying to set up on the server. Given my API is behind an nginx config like this:
Copy code
location /api {
                try_files $uri @api;
        }
The gateway path should be /api and the api path should be just /auth?
And should the gateway path be set for the backend too or is it just for the UI supertokens.init?
the UI uses the api at domain/api and I want it to use supertokens at domain/api/auth
r
so on the frontend, you would give the apiBasePath as /api/auth
and on the backend, you would give the apiBasePath as /auth, and there is a config called apiGatewayPath, which should be set to /api
c
okay I'll try 😄
It's always very fiddly with this stuff on the server 😩
r
Yeaaaaa. It is.
c
didn't work :/
auth endpoints result in 404 from the backend framework
I had to do /api for both the gateway and api path:
Copy code
AUTH_API_PATH=/api/auth
AUTH_WEB_PATH=/login
AUTH_GATEWAY_PATH=/api
Do you have any tips for how to connect the backend to the supertokens core? Everything is running in docker-compose. I tried localhost:3567, supertokens:3567 and 0.0.0.0:3567. Apart from adding it to nginx which I don't really want to do, I'm out of ideas 😕
(supertokens is the service name of the supertokens container in docker-compose)
and yeah the core is running, I can curl the /hello route
When trying to log in, the backend throws the error: No SuperTokens core available to query
r
Huh.. that shouldn’t be needed. Cause now it would resolve it as /api/api/auth
c
well, it works 🤷‍♂️
r
hmm. Thats odd
ok. lmk if you run into any issue