Nginx 反响代理配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| server { listen 80; server_name api.wugee.vip; location / { proxy_pass http://127.0.0.1:3000; } }
server { listen 443; server_name api.wugee.vip; ssl on; ssl_certificate cert/api.wugee.vip.pem; ssl_certificate_key cert/api.wugee.vip.key; ssl_prefer_server_ciphers on; ssl_session_timeout 10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; location / { proxy_pass http://127.0.0.1:3000; } }
|
yapi 服务启动
1
| pm2 start yapi-app/server/app.js
|
系统自启动的 mongo 服务替换为自己原来的 mongo
1 2 3 4 5
| ps -ax | grep mongod kill -9 ID
mongod -f /etc/mongod.conf
|
可以用下述命令看下 mongo 数据对不对
1 2 3
| show dbs; use yapi; db.user.find()
|
重启 pm2 服务