Login and register not work in focalboard

When I use sub path for the focalboard such as 192.168.7.43/focalboard, login and register new account not work it display login failed error for login and undefined for register new account .

My conf.json is:
{
“serverRoot”: “http://192.168.7.43/focalboard”,
“port”: 8000,
“dbtype”: “postgres”,
“dbconfig”: “postgres://focaluser:password@localhost/focaldbsslmode=disable&connect_timeout=10”,
“postgres_dbconfig”: “dbname=focalboard sslmode=disable”,
“useSSL”: false,
“webpath”: “./pack”,
“filespath”: “./files”,
“telemetry”: true,
“prometheusaddress”: “:9092”,
“session_expire_time”: 2592000,
“session_refresh_time”: 18000,
“localOnly”: false,
“enableLocalMode”: true,
“localModeSocketLocation”: “/var/tmp/focalboard_local.socket”
}

my nginx.conf is:

upstream focalboard {
server localhost:8000;
keepalive 32;
}
server {
listen 80;
listen [::]:80;

server_name 192.168.7.43;

location /focalboard {
proxy_pass 127.0.0.1:8000; (there is http put the post no allow me to put two links)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

the error in error.log is:

2023/06/15 05:50:15 [error] 63691#63691: *887 open() “/usr/share/nginx/html/api/v2/register” failed (2: No such file or directory), client: 10.10.106.23, server: 192.168.7.43, request: “POST /api/v2/register HTTP/1.1”, host: “192.168.7.43”, referrer: “192.168.7.43/register”
2023/06/15 05:51:40 [error] 63691#63691: *916 open() “/usr/share/nginx/html/api/v2/login” failed (2: No such file or directory), client: 10.10.106.23, server: 192.168.7.43, request: “POST /api/v2/login HTTP/1.1”, host: “192.168.7.43”, referrer: “192.168.7.43/login”

My versions:
Ubuntu-22.04-server
nginx/1.18.0
PostgreSQL 14.8
focalboard 7.10.0

Screenshot 2023-06-15 122326

I’m not sure if focalboard can be run on a subpath to be honest. It seems as if the generated links ignore the subpath. You could apply some nginx magic to rewrite the response from the backend and automatically add the /focalboard to the requests, but it would be easier if you could put focalboard on a subdomain on its own - is it possible to use domain names in your setup?

I didn’t understand your point, do you mean if I write http://domainname.com/focalboard it will be work?
Can you explain more

The problem you’re experiencing indicates that the focalboard personal server seems to have problems when being hosted on a subpath (http://<whatever>/focalboard), so if you’re running multiple applications on the same server and want to use the subpaths because of that, I suggested to put focalboard on something like http://focalboard.domain.tld so that there is no need for a subpath, but that will not work with IP addresses obviously (unless you have multiple IP addresses, that way you can dedicated one IP address to the focalboard server). Could you try that?