Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up Reverse Proxy with SWAG? #48

Open
beboprocky opened this issue Mar 4, 2024 · 0 comments
Open

Setting up Reverse Proxy with SWAG? #48

beboprocky opened this issue Mar 4, 2024 · 0 comments

Comments

@beboprocky
Copy link

Example: https://shareme.domain.com

Setup (using *.domain.com as an example):
Docker Compose
frontend:
environment:
POCKETBASE_URL: https://shareme-pb.domain.com

I then go to shareme-pb.domain.com/_/
I create an admin account.
I create a user account.
I go to Settings > Application > and set the following:
Application name: shareme
Application url: https://shareme.domain.com (same url as above but without "-pb")

Both domains work. But I am unable to login or sign up for a new account on the front end. Clicking "Login" does nothing. Clicking "Sign Up" gives me a 500 error.

I'm a little confused on the setup at this point.. The documentation says to forward "/api and /_ to the PocketBase backend" and "the rest of the traffic including /_next to the frontend". I saw in a Reddit post this possible to do with using subdomains, but I'm not sure what subdomains should be pointed to which domains or IP addresses. I don't believe SWAG can forward paths, so subdomains might be my only route.

Also, would the backend in this case be "shareme-pb.domain.com" or would I need to forward api and /_ to something else?

Thank you for the help if at all possible. I'm a self-host hobbyist so a few concepts do go over my head. I was able to get it working locally without a reverse proxy and this seems to be exactly what I was looking for. I appreciate the hard work that's gone into this project. It was definitely needed in the self-hosting space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant