Post

Alist

部署在子目录

配置文件说明:
config.json内配置文件修改后都需要重启 AList 才会生效

  • Windows/Mac:和 AList 同级文件夹內的 data/config.json
  • Linux:一键脚本路径,、/opt/alist/data/config.json,手动安装 /xx 路径/data/config.json
  • Docker:进入 Docker 容器内data/config.json
  • openwrt:如果使用的是 luci-app-alist,请在网页修改,其他自行找到 AList 执行文件同级目录data/config.json
  • 其他:找到 AList 同级文件夹內的 data/config.json

官方网文档 子目录反代

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
  "force": false,
  "site_url": "",
  "cdn": "",
  "jwt_secret": "random_generated",
  "token_expires_in": 48,
  "database": {
    "type": "sqlite3",
    "host": "",
    "port": 0,
    "user": "",
    "password": "",
    "name": "",
    "db_file": "data\\data.db",
    "table_prefix": "x_",
    "ssl_mode": "",
    "dsn": ""
  },
  "meilisearch": {
    "host": "http://localhost:7700",
    "api_key": "",
    "index_prefix": ""
  },
  "scheme": {
    "address": "0.0.0.0",
    "http_port": 5244,
    "https_port": -1,
    "force_https": false,
    "cert_file": "",
    "key_file": "",
    "unix_file": "",
    "unix_file_perm": ""
  },
  "temp_dir": "data\\temp",
  "bleve_dir": "data\\bleve",
  "dist_dir": "",
  "log": {
    "enable": true,
    "name": "data\\log\\log.log",
    "max_size": 50,
    "max_backups": 30,
    "max_age": 28,
    "compress": false
  },
  "delayed_start": 0,
  "max_connections": 0,
  "tls_insecure_skip_verify": true,
  "tasks": {
    "download": {
      "workers": 5,
      "max_retry": 1,
      "task_persistant": true
    },
    "transfer": {
      "workers": 5,
      "max_retry": 2,
      "task_persistant": true
    },
    "upload": {
      "workers": 5,
      "max_retry": 0,
      "task_persistant": false
    },
    "copy": {
      "workers": 5,
      "max_retry": 2,
      "task_persistant": true
    }
  },
  "cors": {
    "allow_origins": [
      "*"
    ],
    "allow_methods": [
      "*"
    ],
    "allow_headers": [
      "*"
    ]
  },
  "s3": {
    "enable": false,
    "port": 5246,
    "ssl": false
  }
}

site_url

你的网站 URL,比如 https://pan.nn.ci,这个地址会在程序中的某些地方使用,如果不设置这个字段,一些功能可能无法正常工作,比如

  • 本地存储的缩略图
  • 开启 web 代理后的预览
  • 开启 web 代理后的下载地址
  • 反向代理至二级目录

URL 链接结尾请勿携带 / ,参照如下示例,否则也将无法使用上述功能或出现异常

1
2
3
4
# 正确写法:
"site_url": "https://al.nn.ci",
# 错误写法:
"site_url": "https://al.nn.ci/",
This post is licensed under CC BY 4.0 by the author.