我正在尝试在 NGINX 代理管理器后面为 PhotoPrism 设置 WebDAV,但遇到了困难。我的设置包括:
PhotoPrism 配置在端口 2342 上; NGINX 在端口 80 和 443 上运行。我的目标是通过 WebDAV 与 PhotoPrism 同步来自 QNAP NAS 的照片。但是,我遇到了“不允许使用方法”错误。
这是我的 NGINX 代理管理器的 Docker 堆栈:
yaml
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '443:443'
- '81:81'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
这是我的 PhotoPrism Docker 堆栈:
yaml
version: '3.5'
services:
photoprism:
image: photoprism/photoprism:latest
stop_grace_period: 10s
depends_on:
- mariadb
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342"
environment:
PHOTOPRISM_HTTP_PORT: 2342
PHOTOPRISM_DATABASE_DRIVER: "mysql"
PHOTOPRISM_DATABASE_SERVER: "mariadb:3306"
PHOTOPRISM_DATABASE_NAME: "[Photoprism Databasename]"
PHOTOPRISM_DATABASE_USER: "[Photoprism DB-User]"
PHOTOPRISM_DATABASE_PASSWORD: "[Photoprism Database Password]"
PHOTOPRISM_ADMIN_PASSWORD: "[Photoprism Admin Password]"
PHOTOPRISM_PUBLIC: "false"
PHOTOPRISM_READONLY: "true"
volumes:
- photoprism_originals:/photoprism/originals
- photoprism_storage:/photoprism/storage
mariadb:
image: mariadb:10.11
restart: unless-stopped
stop_grace_period: 5s
security_opt:
- seccomp:unconfined
- apparmor:unconfined
command: "[MariaDB Configuration Commands]"
volumes:
- mariadb_data:/var/lib/mysql
environment:
MARIADB_DATABASE: "photoprism"
MARIADB_USER: "photoprism"
MARIADB_PASSWORD: "[MariaDB User Password]"
MARIADB_ROOT_PASSWORD: "[MariaDB Root Password]"
volumes:
mariadb_data:
photoprism_originals:
photoprism_storage:
在 NGINX 代理管理器的“高级”下,我添加了以下配置:
nginx
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://[IP-of-PhotoPrism-Container]:2342;
proxy_read_timeout 90;
}
尽管进行了这些设置,我仍然收到错误,表明 NGINX 服务器未将请求正确转发到 PhotoPrism。
我的问题是:
任何帮助或指导将不胜感激。预先感谢您!
最诚挚的问候, 彼得
看我上面的文字,这里有你需要的一切
2 和 3. 是的,我自己也遇到过这个问题,然后就解决了!首先,查看无 WebDAV 访问页面。
这是我必须做的(我的设置有点不同):
因此,无论您如何设置,都会有一个在主机/容器/运行它的任何设备上运行的 Photoprism CLI。命令是:
photoprism users mod --webdav will
,其中用户名是“will”