alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.56k stars 223 forks source link

🐛 [Photoprism] webdav urls yield a 404 #1546

Closed pazz closed 2 months ago

pazz commented 3 months ago

Description

Hi! I have set up photoprism via your addon and it works well so far, except that I cannot access my library (originals folder) via webdav as documented on their pages. I am using a system-wide ssl certificate and access the UI via https, which works fine. However, the webdav urls listed on the photoprism app itself (which look as expected) give me a 404. I suspect that it is an issue with how you configured nginx?

Reproduction steps

  1. access the UI via ingress and log in as admin
  2. go to settings -> account
  3. find the webdav url under security and access (this URL lists the HO UI port if you opened photoprism via ingres but the correct photoprism UI port otherwise): https://admin@my-public-ip-address:2342/originals/
  4. use your favorite webdav client to access it. Using the browser this url gives a 404 (nginx page).

I am not sure if the issue may be with the proxy that serves HA or photoprism, and I cannot find anything related to webdav in the add-on log. Happy to dig out logs if you tell me where to look.

I'm on HAos on a RP4.

Many thanks

Addon Logs

-----------------------------------------------------------
 Add-on: Photoprism
 A server-based application for browsing, organizing and sharing your personal photo collection
-----------------------------------------------------------
 Add-on version: ubuntu-2024-07-11
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.1  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.8.2
 Home Assistant Supervisor: 2024.08.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
/etc/cont-init.d/00-folders.sh: executing
[12:37:42] INFO: Preparing scripts
... creating structure
... setting permissions
/etc/cont-init.d/00-global_var.sh: executing
BACKUP_PATH='/media/DATA/photoprism/backup'
CONFIG_LOCATION='/config/addons_config/photoprism/config.yaml'
DB_TYPE='mariadb_addon'
IMPORT_PATH='/media/DATA/photoprism/import'
ORIGINALS_PATH='/media/DATA/pictures/'
STORAGE_PATH='/media/DATA/photoprism/storage'
UPLOAD_NSFW='true'
certfile='fullchain.pem'
cifsdomain='home'
keyfile='privkey.pem'
ssl='true'
Timezone set from Etc/UTC to Europe/London
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory
Load environment variables from /config/addons_config/photoprism/config.yaml if existing

If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/photoprism/config.yaml
---------------------------------------------------------

Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables
... no env variables found, exiting
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/photoprism/photoprism.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/30-graphic_drivers.sh: executing
/etc/cont-init.d/32-nginx_ingress.sh: executing
/etc/cont-init.d/32-nginx_ssl.sh: executing
Defining ssl configuration
... checking if referenced certificates exist
[12:37:48] INFO: Ssl enabled, please use https for connection. UI is at https://YOURIP:2342
/etc/cont-init.d/90-disable_ingress.sh: executing
/etc/cont-init.d/99-run.sh: executing
[12:37:48] INFO: Defining database
[12:37:48] INFO: Using MariaDB addon. Requirements : running MariaDB addon. Discovering values...
PHOTOPRISM_DATABASE_DRIVER=mysql
PHOTOPRISM_DATABASE_SERVER=core-mariadb:3306
PHOTOPRISM_DATABASE_NAME=photoprism
PHOTOPRISM_DATABASE_USER=service
PHOTOPRISM_DATABASE_PASSWORD=oexoophiequoo1niejusho8eib4katooYizoo0ouTeiwee1ighaerai9aekaipha
[12:37:54] WARNING: Photoprism is using the Maria DB addon
[12:37:54] WARNING: Please ensure this is included in your backups
[12:37:54] WARNING: Uninstalling the MariaDB addon will remove any data
[12:37:54] WARNING: Ingress is enabled. To connect, you must add /api/hassio_ingress/u_YgI-Iefaz5OrRBNDdAdAwDQthum2u7PHfqO5Na4aI/ to the end of your access point. Example : http://my-url:8123/api/hassio_ingress/u_YgI-Iefaz5OrRBNDdAdAwDQthum2u7PHfqO5Na4aI/
[12:37:55] INFO: Please wait 1 or 2 minutes to allow the server to load
[12:37:55] INFO: Default username : admin, default password: "please_change_password"
[12:37:55] INFO: Starting, please wait for next green text...
started 240711 as root (arm64-prod)
init: https
Creation of a default HTTPS/TLS certificate is skipped because PHOTOPRISM_DEFAULT_TLS is "false".
Problems? Our Troubleshooting Checklists help you quickly diagnose and solve them:
https://docs.photoprism.app/getting-started/troubleshooting/
file umask....: "0002" (u=rwx,g=rwx,o=rx)
home directory: /data/photoprism
assets path...: /opt/photoprism/assets
storage path..: /media/DATA/photoprism/storage
config path...: default
cache path....: default
backup path...: /media/DATA/photoprism/backup
import path...: /media/DATA/photoprism/import
originals path: /media/DATA/pictures/
running as uid 0
photoprism start
time="2024-08-24T12:38:10+01:00" level=info msg="Become a member today, support our mission and enjoy our member benefits! 💎"
time="2024-08-24T12:38:10+01:00" level=info msg="Visit https://www.photoprism.app/membership to learn more."
time="2024-08-24T12:38:11+01:00" level=info msg="webdav: shared /api/hassio_ingress/u_YgI-Iefaz5OrRBNDdAdAwDQthum2u7PHfqO5Na4aI/originals/"
time="2024-08-24T12:38:11+01:00" level=info msg="webdav: shared /api/hassio_ingress/u_YgI-Iefaz5OrRBNDdAdAwDQthum2u7PHfqO5Na4aI/import/"
time="2024-08-24T12:38:11+01:00" level=info msg="server: disabled tls"
time="2024-08-24T12:38:11+01:00" level=info msg="server: listening on 0.0.0.0:2341 [34.008537ms]"
[12:38:11] INFO: App launched

Architecture

armv7

OS

HAos

pazz commented 2 months ago

It appears that disabling ingress via this plugins config causes webdav via the non-ingress URL to work. It is confusing as both the ingress url and the usual ip:port/ variant work for the webUI but not the webdav part apparently..