一.nginx启动失败
问题:在修改完nginx配置文件后,我直接cmd中输入nginx -s reload后:
nginx: [error] CreateFile() “G:\word\nginx-1.18.0/logs/nginx.pid” failed (2: The system cannot find the file specified)
解决:应该先cmd中输入nginx让nginx.pid这个文件先生成的。
二.Redis无法局域网访问
问题:项目无法通过真实ip连接redis,java.io.IOException: 远程主机强迫关闭了一个现有的连接
分析:因为redis默认绑定了127.0.0.1的ip,使用真实ip是无法连接到redis的。
解决:修改配置文件,我是使用redis.windows.conf启动redis的:
可以的话这里也可以注释掉
可以设置tcp的超时时间