Skip to content

Commit 3b80f87

Browse files
committed
scheme instructions
1 parent 8dbcf8e commit 3b80f87

File tree

3 files changed

+97
-121
lines changed

3 files changed

+97
-121
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ yalc.lock
1212
# Vuepress Output
1313
dist/
1414

15+
.VSCodeCounter

docs/config/configuration.md

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,43 @@ After modifying the configuration file in `config.json`, you need to restart ALi
3434
```json
3535
{
3636
"force": false,
37-
"address": "0.0.0.0",
38-
"port": 5244,
39-
"https_port": 5245,
4037
"site_url": "",
4138
"cdn": "",
42-
"jwt_secret": "",
39+
"jwt_secret": "random_generated",
4340
"token_expires_in": 48,
4441
"database": {
4542
"type": "sqlite3",
46-
"host": "",
47-
"port": 0,
48-
"user": "",
49-
"password": "",
50-
"name": "",
51-
"db_file": "data\\data.db",
43+
"host": "localhost",
44+
"port": 5432,
45+
"user": "postgres",
46+
"password": "securepasswd",
47+
"name": "alist",
48+
"db_file": "data/data1.db",
5249
"table_prefix": "x_",
53-
"ssl_mode": ""
50+
"ssl_mode": "disable"
5451
},
5552
"scheme": {
56-
"disable_http": false,
57-
"https": false,
53+
"address": "0.0.0.0",
54+
"http_port": 5244,
55+
"https_port": -1,
5856
"force_https": false,
5957
"cert_file": "",
60-
"key_file": ""
58+
"key_file": "",
59+
"unix_file": ""
6160
},
62-
"temp_dir": "data\\temp",
61+
"temp_dir": "data/temp",
6362
"bleve_dir": "data\\bleve",
6463
"log": {
65-
"enable": true,
66-
"name": "data\\log\\log.log",
64+
"enable": false,
65+
"name": "log/log.log",
6766
"max_size": 10,
6867
"max_backups": 5,
6968
"max_age": 28,
7069
"compress": false
7170
},
7271
"delayed_start": 0,
7372
"max_connections": 0,
74-
"tls_insecure_skip_verify": true
73+
"tls_insecure_skip_verify": false
7574
}
7675
```
7776

@@ -81,24 +80,10 @@ After modifying the configuration file in `config.json`, you need to restart ALi
8180

8281
The program will preferentially read the configuration from the environment variable, set `force` to `true` to force the program to read the configuration file.
8382

84-
### **address**
85-
86-
The address to listen on, default `0.0.0.0`
87-
88-
### **port**
89-
90-
The port to listen on, default `5244`
91-
92-
93-
### **https_port**
94-
95-
HTTPS port,default 5245
96-
97-
- You need to open the https in [`Scheme`](#scheme) to enable it.If you use Nginx reverse proxy and open HTTPS, this is not related to this
98-
9983
### **site_url**
10084

10185
The url of your `alist` site, such as `https://pan.nn.ci`.This address will be used in some places in the program, If you do not set this field, Some features may not work properly, such as:
86+
10287
- thumbnail of `LocalStorage`
10388
- Preview after opening web proxy
10489
- The download address after opening the web proxy
@@ -109,9 +94,9 @@ Please do not include `/` at the end of the URL link, refer to the following exa
10994

11095
```json
11196
# Correct way of writing:
112-
"site_url": "https://pan.nn.ci",
97+
"site_url": "https://al.nn.ci",
11398
# Wrong way of writing:
114-
"site_url": "https://pan.nn.ci/",
99+
"site_url": "https://al.nn.ci/",
115100
```
116101

117102
### **cdn**
@@ -131,6 +116,8 @@ So you can use any npm or github cdn as the path, for example:
131116
- https://cdn1.tianli0.top/npm/alist-web@$version/dist/
132117
- https://cdn1.tianli0.top/gh/alist-org/web-dist@$version/dist/
133118
- https://npm.elemecdn.com/alist-web@$version/dist/
119+
- https://jsd.onmicrosoft.cn/npm/alist-web@$version/dist/
120+
- https://jsd.onmicrosoft.cn/gh/alist-org/web-dist@$version/dist/
134121

135122
Also you can keep it empty to use local dist.
136123

@@ -166,7 +153,7 @@ The database configuration, the default is `sqlite3`, you can also use `mysql` o
166153

167154
If you don’t know how to fill in, fill in the default blank, no need to modify, if you can’t use it if you don’t fill it in, do your own research, and you can’t provide much effective help
168155

169-
-----
156+
---
170157

171158
In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of the SSL connection. Here are a few common options:
172159

@@ -178,7 +165,7 @@ In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of
178165

179166
MySQL 5.x and 8.x are also different. If you use the free/fee database provided by the service provider, the service provider will have documentation. You must know the database you deploy yourself.
180167

181-
-----
168+
---
182169

183170
In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses SSL connections. Here are a few common options:
184171

@@ -189,7 +176,7 @@ In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses S
189176
- `verify-ca`: Must use SSL connection and verify the authenticity of the server certificate.
190177
- `verify-full`: MUST connect using SSL and verify the authenticity and name of the server certificate matches the connected hostname.
191178

192-
----
179+
---
193180

194181
::: right
195182

@@ -207,11 +194,13 @@ The scheme configuration, if you want to use https, you can set this field.
207194

208195
```json
209196
"scheme": {
210-
"disable_http": false, //Whether the HTTP protocol is forbidden
211-
"https": true, //Enable https, the default is false
212-
"force_https": false, //Whether the HTTPS protocol is forcibly, if it is set to True, the user can only access the website through HTTPS
213-
"cert_file": "data\\public.crt", //Path selection file
214-
"key_file": "data\\key.key" //Path selection file
197+
"address": "0.0.0.0", // The http/https address to listen on, default `0.0.0.0`
198+
"http_port": 5244, // The http port to listen on, default `5244`, if you want to disable http, set it to `-1`
199+
"https_port": -1, // The https port to listen on, default `-1`, if you want to enable https, set it to non `-1`
200+
"force_https": false, // Whether the HTTPS protocol is forcibly, if it is set to True, the user can only access the website through HTTPS
201+
"cert_file": "", // Path of cert file
202+
"key_file": "", // Path of key file
203+
"unix_file": "" // Unix socket file path to listen on, default empty, if you want to use unix socket, set it to non empty
215204
},
216205
```
217206

@@ -255,7 +244,7 @@ Because sometimes the network connection is slow, the driver that needs to be co
255244
The maximum number of connections (concurrent) at the same time, the default is 0, that is, unlimited.
256245

257246
- 10 or 20 is recommended for general equipment such as n1
258-
- Use scenarios (for example, if the picture mode is turned on, the device will crash if the concurrency is not very good)
247+
- Use scenarios (for example, if the picture mode is turned on, the device will crash if the concurrency is not very good)
259248

260249
### **tls_insecure_skip_verify**
261250

0 commit comments

Comments
 (0)