nginx接口

获取nginx状态

URL: http://your_ip:port/api/nginx/nginxStatus

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 获取nginx状态

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/nginxStatus

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"qh9893",
	"msg":"nd71zo",
	"obj":{
		
	}
}

替换conf文件

URL: http://your_ip:port/api/nginx/replace

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 替换conf文件

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/replace

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"ag2t5r",
	"msg":"ll24io",
	"obj":{
		
	}
}

效验conf文件

URL: http://your_ip:port/api/nginx/check

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 效验conf文件

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/check

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"t5vc9j",
	"msg":"n0tfv3",
	"obj":{
		
	}
}

重载conf文件

URL: http://your_ip:port/api/nginx/reload

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 重载conf文件

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/reload

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"91l8si",
	"msg":"3ueqic",
	"obj":{
		
	}
}

获取nginx启动命令

URL: http://your_ip:port/api/nginx/getNginxStartCmd

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 获取nginx启动命令

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/getNginxStartCmd

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"rk3ofy",
	"msg":"7dl4os",
	"obj":[
		"7wgsjg",
		"9e4hbo"
	]
}

获取nginx停止命令

URL: http://your_ip:port/api/nginx/getNginxStopCmd

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 获取nginx停止命令

Request-example:

curl -X ANY  -i http://your_ip:port/api/nginx/getNginxStopCmd

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"5g5cv7",
	"msg":"o6my2g",
	"obj":[
		"h0za7i",
		"fer2s9"
	]
}

执行nginx命令

URL: http://your_ip:port/api/nginx/runNginxCmd

Type: ANY

Content-Type: application/x-www-form-urlencoded;charset=utf-8

Description: 执行nginx命令

Request-parameters:

ParameterTypeDescriptionRequiredSince
cmdstring命令内容true-

Request-example:

curl   -i http://your_ip:port/api/nginx/runNginxCmd?cmd=t0342e

Response-fields:

FieldTypeDescriptionSince
successboolean请求结果-
statusstring请求状态 200:请求成功 401:token无效 500:服务器错误-
msgstring错误信息-
objobject返回内容-

Response-example:

{
	"success":true,
	"status":"lfdnjr",
	"msg":"jf37e9",
	"obj":{
		
	}
}