一、服务端证书制作(针对B/S项目) 1.在Centos7上新建一个空目录,创建mySsl.conf的配置文件,包含如下内容: [ req ] default_bits = 2048 distinguished_name = req_distinguished_name req_extensions ...
分类:
其他好文 时间:
2020-06-11 13:15:58
阅读次数:
69
# nginx 初始化,父脚本中的变量会自动传入引入的脚本中 . init/nginx.sh 子脚本内容 #!/bin/bash # 生成nginx配置 # cur_dir=$(pwd) # cur_dir=$(dirname $(pwd)) # input_name=demo # input_do ...
分类:
系统相关 时间:
2020-06-10 11:20:31
阅读次数:
136
未优化前 优化后 记得要在服务器或者nginx配置相关压缩的文件类型,否则不会生效 ...
分类:
其他好文 时间:
2020-06-09 20:46:49
阅读次数:
119
也是线上遇到的问题, 假设nginx配置为 upstream zed { server 192.168.0.1:3000 max_fails=3 fail_timeout=30s; server 192.168.0.2:3000 backup max_fails=3 fail_timeout=30s ...
分类:
其他好文 时间:
2020-06-09 14:46:13
阅读次数:
81
1、Nginx配置文件如下: #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid log ...
分类:
Web程序 时间:
2020-06-07 19:29:46
阅读次数:
75
安装LNMP架构 环境清单 list CentOS7. nginx-1.18.0-1.el7.ngx.x86_64 php-fpm-5.4.16-48.el7.x86_64 mysql-5.7.23-1.el7.x86_64.rpm-bundle.tar 主机 操作系统 IP地址 硬件/网络 Mys ...
分类:
其他好文 时间:
2020-06-07 19:15:04
阅读次数:
73
遇到的问题: form表单上传视频文件,超过了100M,一直报500错误,代码没发现问题,才发现是php和apache限制了文件上传大小 不管是上传文件,图片,视频,都会受到php,apache,nginx配置的限制 php配置: php.ini: file_uploads = On 是否允许上传, ...
分类:
Web程序 时间:
2020-06-06 17:04:57
阅读次数:
86
1. Nginx 反向代理,负载均衡,动静分离,工作原理及优化 nginx配置反向代理。 vim Nginx.conf Server模块中配置 Listen 80 Server_name ip; 在server段里面的location加上proxy_pass http://ip:端口; Nginx配 ...
分类:
系统相关 时间:
2020-06-05 22:53:43
阅读次数:
204
安装nginx 省略。。。 开启防护墙 通过systemctl start firewalld开启防火墙,没有任何提示即开启成功。 开放指定端口 firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --zone= ...
分类:
Web程序 时间:
2020-06-03 23:22:43
阅读次数:
181
启动 将配置文件设置好,然后执行相应的文件,启动程序。 windows 直接执行可执行文件 2. linux的supervisor配置(后台启动) /home/nginx/sbin/nginx -g 'daemon off;' -c /home/nginx/conf/nginx.conf -p /h ...
分类:
其他好文 时间:
2020-06-02 11:24:53
阅读次数:
165