60 lines
1.8 KiB
Markdown
60 lines
1.8 KiB
Markdown
## HttpServer
|
||
### 2021/09/03
|
||
1. 通过阿里云申请免费SSL证书放置cert目录中。
|
||
2. 修改`conf/nginx.conf`文件,使http全部重定向至https。
|
||
|
||
### Core Dump
|
||
|
||
通过命令`ulimit -a`查看:
|
||
|
||
```
|
||
real-time non-blocking time (microseconds, -R) unlimited
|
||
core file size (blocks, -c) 0
|
||
data seg size (kbytes, -d) unlimited
|
||
scheduling priority (-e) 0
|
||
file size (blocks, -f) unlimited
|
||
pending signals (-i) 6846
|
||
max locked memory (kbytes, -l) 228312
|
||
max memory size (kbytes, -m) unlimited
|
||
open files (-n) 65535
|
||
pipe size (512 bytes, -p) 8
|
||
POSIX message queues (bytes, -q) 819200
|
||
real-time priority (-r) 0
|
||
stack size (kbytes, -s) 8192
|
||
cpu time (seconds, -t) unlimited
|
||
max user processes (-u) 6846
|
||
virtual memory (kbytes, -v) unlimited
|
||
file locks (-x) unlimited
|
||
```
|
||
|
||
core file size这一项为0,说明不生成core dump文件。
|
||
|
||
在`/etc/profile`里面加入
|
||
|
||
```
|
||
ulimit -c unlimited
|
||
sysctl -w kernel.core_pattern=core_%t_%s_%d_%e
|
||
```
|
||
|
||
查看帮助`man 5 core`。
|
||
|
||
### 微信公众号对接
|
||
|
||
1. 公众号管理网页:设置与开发→基本配置→服务器配置。
|
||
2. 由于使用的是测试公众号,因此只能够接受消息,微信服务器会将该信息发送至我们的服务器,然后我们可以对该消息进行回复,随后该连接将被关闭。
|
||
|
||
|
||
|
||
```mermaid
|
||
stateDiagram-v2
|
||
[*] --> Idle
|
||
|
||
Idle --> WaitSetAlarmClock : input 1
|
||
WaitSetAlarmClock --> Idle : process input
|
||
|
||
Idle --> WaitSetText : input 2
|
||
WaitSetText --> Idle : process input
|
||
|
||
Idle --> Idle : not found
|
||
```
|