随笔分类 -  nginx

nginx
摘要:通过nginx上传文件```sh 可以使用Nginx传输文件到服务器,但不需要依赖SSH服务。 通过Nginx实现文件传输通常使用HTTP或FTP协议。在Nginx配置中,您可以设置一个location来指向您需要上传文件的目录,并将适当的指令用于您的情况。例如: server { listen 80; server_n 阅读全文
posted @ 2023-06-12 11:10 安生丶 阅读(3396) 评论(0) 推荐(0) 编辑
摘要:编译安装nginx```sh 安装必要的软件包,使用以下命令安装编译nginx所需的软件包: centos: sudo yum install epel-release sudo yum install gcc gcc-c++ pcre-devel zlib-devel openssl-devel debian: s 阅读全文
posted @ 2023-06-12 10:52 安生丶 阅读(67) 评论(0) 推荐(0) 编辑
摘要:nginx跨域访问location /dyl-server/ { if ($request_method = 'OPTIONS') { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods GET,POST, 阅读全文
posted @ 2023-02-25 14:56 安生丶 阅读(63) 评论(0) 推荐(0) 编辑
摘要:nginx代理mysql#需要用到四层负载。首先确定你的nginx支持四层负载。确定开启stream模块 [root@test-node5 conf.d]# nginx -V configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --wi 阅读全文
posted @ 2023-02-25 14:44 安生丶 阅读(420) 评论(0) 推荐(0) 编辑
摘要:nginx日志切割并备份[root@lecode-pre55 bin]# cat nginx-log.sh #!bin/bash #auther:ansheng #desc: nginx日志备份,注意脚本中文件的路径。 #备份以时间命名。每天晚上两点执行备份。时间减1 date=`date -d "-1day" +%F` 阅读全文
posted @ 2022-11-02 09:58 安生丶 阅读(193) 评论(0) 推荐(1) 编辑
摘要:nginx的域名重写和转发案例对url进行重写 location = /tongyong_OTA_1.0.3.bin { rewrite ^(.*)$ http://36.133.87.223/lecode-server/lecode-dap-server/api/open/server/ota/tongyong_OTA_1.0 阅读全文
posted @ 2022-11-02 09:53 安生丶 阅读(236) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示