Docker安装

必须挂载到云盘那个目录,不能挂载到上一级目录

docker run -d -e PUID=0 -e PGID=0 -e UMASK=022 --name emby -v /app/emby/movies/m1:/data/movies/m1 -v /app/emby/movies/od:/data/movies/od -v /app/emby/config:/config -p 8096:8096 -p 8920:8920 --restart=always xinjiawei1/emby_unlockd:latest

rclone挂载参数

cat > /etc/systemd/system/rclone@.service <<EOF
[Unit]
Description=rclone mount %I drive
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount %i: /app/emby/movies/%i --use-mmap --umask 000 --default-permissions --no-check-certificate --allow-other --allow-non-empty --dir-cache-time 24h --cache-dir=/app/emby/movies/od_cache --vfs-cache-mode full --buffer-size 256M --vfs-read-ahead 512M --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 128M --vfs-cache-max-size 20G --low-level-retries 200 --config /root/.config/rclone/rclone.conf
ExecStop=/bin/fusermount -u /app/emby/movies/%i
Restart=on-abort
User=root
[Install]
WantedBy=multi-user.target
EOF

宝塔反向代理

在宝塔添加好反向代理后,把反向代理的配置文件全都删除,复制如下代码粘贴进去,把里面两处 proxy_pass http://ip:port/ 修改为你要反代的ip或者域名就行。如下图所示。

#PROXY-START/
location ~* \.(gif|png|jpg|css|js|woff|woff2)$
{
    proxy_pass http://ip:port;
    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 REMOTE-HOST $remote_addr;
    expires 12h;
}
client_max_body_size 5000M;
    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_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
    proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
    proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
    proxy_cache off;
    proxy_redirect off;
    proxy_buffering off;
location / {
        proxy_pass http://ip:port;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_ssl_verify off;
        proxy_http_version 1.1;
        proxy_set_header Host $http_host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400;
    }

#PROXY-END/
最后修改:2023 年 01 月 31 日
如果觉得我的文章对你有用,请随意赞赏