immich
immich copied to clipboard
[Feature] Support base url on the web app
Describe the bug
Immich server is deployed using default docker-compose.yml on the private host (Windows10) at http://192.168.3.3:2283/
It is accessible via reverse proxy (Windows Server 2019, IIS 10) at public url http://pavelusik.ru/photosImmich/
Main page is loaded successfully, but is not working. The reason is that /_app/immutable/start-a8372751.js file relative path is wrong:
import { start } from "/_app/immutable/start-a8372751.js";
and therefore error 404 occured.
All other files (css, js, json, favicon, etc) are loaded successfully by their correct relative addresses /photosImmich/...path...
Task List
- [x] I have read thoroughly the README setup and installation instructions.
- [x] I have included my
docker-composefile. - [x] I have included my redacted
.envfile. - [x] I have included information on my machine, and environment.
To Reproduce Steps to reproduce the behavior:
- In browser, open developers console, Network tab
- Go to http://pavelusik.ru/photosImmich/
- See downloaded files and errors
Expected behavior
- All files are downloaded by its relative paths
/photosImmich/...path... - All links are correct too.
System
- Server Version:
v1.25.0_35-devonWindows 10running indocker - Public reverse proxy server:
Windows Server 2019,IIS 10 (with modules URL Rewrite 2, Application Request Routing 3.0)
Additional context docker-compose and env.zip
I think the problem here is that you have /photosImmich append to the URL. So you will need to proxy or rewrite any /api to http://192.168.3.3:2283/api If you use your domain as photoImmich.pavelusik.ru it should work
Do you mean that Immich-web can run only in root path?
Another files are downloaded properly.
Mobile app (Android) works correctly (/photosImmich/api path is ok).
The problem is only in Web-app, and is related only to /_app/immutable/start-a8372751.js file. When opening another page manually auth/login, there is the same error. Login request works correctly, but loaded page has the same error.
I might have the wrong assumptions.
I think what you do is fine, it seems the proxy is working fine as well. I am not sure why that file isn't loaded correctly. Let me do some digging.
At the mean time, can you try to pull immich-web container again and start it backup?
All containers are up-to-date:
>docker-compose pull
Pulling immich-web ... done
Pulling redis ... done
Pulling database ... done
Pulling immich-machine-learning ... done
Pulling immich-microservices ... done
Pulling immich-server ... done
Pulling immich-proxy ... done
> docker-compose up -d
immich_redis is up-to-date
immich_postgres is up-to-date
immich_immich-web_1 is up-to-date
immich_immich-server_1 is up-to-date
immich_immich-machine-learning_1 is up-to-date
immich_immich-microservices_1 is up-to-date
immich_proxy is up-to-date
@usikpavel Immich web can not work perfectly with path prefix now because of web framework config. You'd better use mobile only if you still wanna use path prefix, or use subdomain instead. I hope immich team will ~fix~ support it soon.
@alextran1502 I have a small test with web, Svelte kit not support base url perfectly because goto function not use base url in default. If we support base url, we have to pass base url to all goto function, IMO.
I have problem using HAProxy as SSL termination using something like https://domain.com/immich
I added ACL to manage /immich and /fonts/*** but does not work.