LibrePhotos / librephotos-linux

Here you can find the installation script for a local Linux install.
MIT License
47 stars 15 forks source link

nginx conf file lists wrong port #58

Open PrangerStefan opened 1 year ago

PrangerStefan commented 1 year ago

Hi!

the port listed for the backend here: https://github.com/LibrePhotos/librephotos-linux/blob/main/resources/etc/nginx/librephotos#L49 seems to be wrong.

Setting this up with certbot leads to the following error:

2023/03/20 17:47:30 [error] 754165#754165: *1 connect() failed (111: Connection refused) while connecting to upstream, client: ***.***.***.***, server:
**.**.** , request: "POST /api/auth/token/obtain/ HTTP/2.0", upstream: "http://127.0.0.1:8001/api/auth/token/obtain/", host: "**.**.**"

Changing

proxy_pass http://127.0.0.1:8001;

to

proxy_pass http://127.0.0.1:3000;

seems to fix the issue. I am by no means an nginx/docker-compose expert, but from what I understand the proxy container in docker compose should correctly resolve that and not the reverse proxy on my webserver.

If this is a viable fix, I am happy to open a PR.

Related: Does the install script actually handle creation of ssl-certs? The reference config file lists them, but as far as I understand they do not get created.

P.S.: Thanks a lot for maintaining this project. I was looking for a way to host and backup my photos and librephotos features a things that I consider killer features.

PrangerStefan commented 1 year ago

Now that I have thought about this, this might be totally wrong. I expected this to automate the installation as detailed here: https://docs.librephotos.com/docs/installation/standard-install

Is there a librephotos.conf for nginx that is supposed to work with the setup with docker-compose?

(I am aware that this is now the incorrect repo to discuss this, I guess a PR that adds a static nginx conf and links it here would be better?)