Any reverse proxy gurus out there? pfsense and HAProxy

Hi all,

I am running an UnRaid server behind a pfsense firewall which runs HAProxy as a reverse proxy. I am struggling with the reverse proxy bit. I reverse proxy lots of services but this is the first one where I need to parse the url and send anything that has /api/v1 on it to a different place.

So I am assuming that I have the dockers setup correctly as I can create a user and login if I use the local ip address. Would this be a correct assumption?

My firewall/reverse proxy knowledge is cobbled together when I need something then not used for long and long so my terminology might be complete garbage!

In HAProxy I have set up 2 backends and 2 frondends

Backends forwards traffic to 192.168.x.x:8079 forwardfs traffic to 192.168.x.x:3456

then the frontends I have an ACL and Action for each

todo - Host matches: -
todo-api - Host Starts With:


todo uses backend todo
todo-api uses backend todo-api

For the todo-api I have tried various ACL config

Host Starts With:
Host matches:
Path Starts With:
Path Starts With: ./api/v1

No matter what I do the error is always the same in the UI it says

Request failed with status code 405

in the dev tools I get

POST 405 (Not Allowed)

Hope this makes some sense as I barely understand what I am trying to ask



Did you change the api address on the login page?

This looks like you didn’t configure the API URL in the vikunja frontend. Since you’re running in docker it’s as easy to make this permanent as setting the respective environment variable: Install Frontend | Vikunja

To check if everything works, can you reach the api at ?

Thanks @kolaente for the response
Sorry I must have left that out of my original post
I have VIKUNJA_API_URL set as
and if I go to it redirects me to

Thanks for the response @vikunja.jf4wf Do I still need to do that if I have set VIKUNJA_API_URL and if so which docker container is it in?

So we have a few things. Vikunja works with a backend and frontend, for every new frontend you might need to set the api_url.

Don’t touch your docker, the place that you will change the api url is in the login page of . Click change just above the username and put the there.

you will need two subdomains, one for the vikunja frontend and one for the vikunja api in your reverse proxy.

So the login page already has though not with the trailing /
I tried it with the trailing / and I still get Request failed with status code 405

In my reverse proxy I have two subdomains setup points to 192.168.x.x:3456 points to 192.168.x.x:8079

I then have in my api docker
And in my frontend docker I have

should the frontend be pointing to the todo-api instead?
If I try changing the login page to point to I get a CORS error in the dev tools window even though in the config.yml CORS is enabled

I am unclear what should be set to what… I have 2 subdomains but I have not put the todo-api subdomain in any config anywhere… surely something needs to know about it?

Should I be able to hit without using the frontend?

Got it working… so in my reverse proxy I had the path on the end of the URL and was trying to do host starts with or path starts with.

What I needed to do was just have the 2 subdomains ignoring any paths setup
Then in the frontend I set VIKUNJA_API_URL to be

thanks for all the help!

1 Like