-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.json
More file actions
128 lines (124 loc) · 3.38 KB
/
sample.json
File metadata and controls
128 lines (124 loc) · 3.38 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[
// Servers
// 监听服务集
// 可配置多项监听服务,端口不能相同
{
// 监听地址,缺省监听所有地址
ip: null,
// 监听端口
port: 80,
// 服务类型,可选:HTTP、HTTPS
type: "HTTP",
// 服务管理名称
name: "default",
// 连接等待队列
backlog: 512,
// 服务程序集
// 可配置多项服务程序
servlets: [
{
// WEBDAV 服务程序
type: "WEBDAV",
// 请求路径
path: "/webdav/*",
// 服务程序参数
parameters: {
// 内容目录位置
content: "/var/www/webdav"
},
// 附加响应标头集
// 每次响应中将添加这些标头
headers: {}
},
{
// 请求重定向
type: "LOCATION",
// 请求路径
path: "/webdav",
// 服务程序参数
parameters: {
// 重定向路径
location: "/webdav/",
// 状态码
status: 301
},
// 附加响应标头集
// 每次响应中将添加这些标头
headers: {}
// 由于Windows添加或映射网络位置时会移除尾部斜杠
// 因此通常为WEBDAV指定重定向
},
{
// 资源服务程序
// 发布前端网站使用此服务程序
type: "RESOURCE",
// 请求路径, * 表示匹配所有路径
path: "*",
// 服务程序参数
parameters: {
// 文件缓存目录位置,未指定时为系统临时文件
cache: "caches",
// 内容目录位置
content: "/var/www/joyzl",
// 默认页面
defaults: ["index.html", "default.html"],
// 需要压缩的文件扩展名,GZip或Deflate压缩
compresses: [".html", ".htm", ".css", ".js", ".json", ".svg", ".xml"],
// 需要缓存的文件扩展名,在内存中缓存
caches: [".html", ".htm", ".css", ".js", ".json", ".svg", ".jpg", ".jpeg", ".png", ".gif", ".ttf", ".woff", ".woff2"],
// 错误页面所在目录,其中按 404.html 匹配错误页面
error: "/var/www/joyzl/errors",
// 是否允许列出文件,当目录的默认页面缺失时,默认不允许
browsable: false,
// 是否允许编辑文件,启用后将允许PUT和DELETE请求,默认不允许
editable: false,
// 采用比较器生成ETag,默认启用
weak: true
},
// 附加响应标头集
// 每次响应中将添加这些标头
headers: {
"X-Frame-Options": "DENY",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Content-Security-Policy": "frame-ancestors 'none';"
}
}
],
// 身份验证集
authenticates: [
{
// 需要身份验证的路径(包括子路径)
path: "/",
// 身份验证类型,可选:None、Basic、Digest、Deny
type: "None",
// 领域信息
realm: "Server manage",
// 验证算法,默认未指定由程序决定
algorithm: null,
// 需要验证的请求方法,默认所有方法须验证
methods: ["GET", "HEAD"]
}
],
// 虚拟主机集
// 可配置多项虚拟主机
hosts: [
{
// 虚拟主机管理名称
name: "JOYZL",
// 虚拟主机域名
names: ["www.joyzl.com", "www.joyzl.cn"],
// 服务程序集
servlets: [
// 与前部分配置方式类似
],
// 身份验证集
authenticates: [
// 与前部分配置方式类似
],
// 访问日志记录位置
access: "/var/www/joyzl-access/"
}],
// 访问日志记录位置
access: "access/"
}
]