I
Immich3y ago
satish

Nginx Default Recommended Config has an issue

Re-created the nginx settings using https://github.com/immich-app/immich/blob/main/nginx/templates/default.conf.template and it seems to cause an issue with logging in.. Commenting line 61 : rewrite /api/(.*) /$1 break; makes it work fine.
GitHub
immich/default.conf.template at main · immich-app/immich
Self-hosted photo and video backup solution directly from your mobile phone. - immich/default.conf.template at main · immich-app/immich
8 Replies
Alex Tran
Alex Tran3y ago
what is the reverse proxy are you using?
satish
satishOP3y ago
nginx
Alex Tran
Alex Tran3y ago
And to confirm, you are not using immich-proxy container, correct?
satish
satishOP3y ago
no.. i have a webserver in a vps.. which is also connected to my home pc via a vpn .. the VPS acts as a reverse proxy
Alex Tran
Alex Tran3y ago
I don't have a good understanding about your setup. Anyway the template nginx doesn't mean to be used as a standalone file You can run Immich stack as is and then from your reverse proxy, point your dns to immich-ip:2283 then you should be good to go
satish
satishOP3y ago
yes , pretty much what i did with a proxy pass to 10.100.40.20:2283 i.e. my local pc at home btw.. reloading this updated nginx reverse proxy fixed the delete issue.. However the missing unsynced image remains just FYI .. incase someone else runs into it ..
agd
agd3y ago
I have a very simple proxy block in front of the immich container proxy:
client_max_body_size 0;

location / {
include directives/proxy.conf;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_http_version 1.1;
proxy_max_temp_file_size 96384m;
proxy_pass http://127.0.0.1:3300;
}
client_max_body_size 0;

location / {
include directives/proxy.conf;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_http_version 1.1;
proxy_max_temp_file_size 96384m;
proxy_pass http://127.0.0.1:3300;
}
@satish it sounds like you're looking at the internal proxy as a reference for what to do with an upstream reverse-proxy... which I don't think is a good idea.
satish
satishOP3y ago
@agd the internal proxy is just another device on the vpn .. its actually how upstream proxies are supposed to be used.. specially for load balancing.. generally the reverse proxy sits on the edge.. with additional servers in the background which maybe internally accessible to the reverse proxy itself

Did you find this page helpful?