随笔分类 - Nginx
Nginx运维
摘要:对于nginx以下日志来说: log_format main '$remote_addr - $remote_user [$time_local] "$request" ' ' $status $body_bytes_sent "$http_referer" ' ' "$http_user_agen
阅读全文
摘要:coco.conf ##upstream upstream php_coco_backend{ server 127.0.0.1:8019; } server { listen 80; server_name 139.224.68.68; location / { root htdocs_coco;
阅读全文
摘要:upstream.conf upstream api { server 192.168.10.10:8080; server 192.168.10.20:8080;} server{ listen 443 ssl; server_name gui.sensen.com; location / { p
阅读全文
摘要:1、/etc/nginx/conf.d/ 下设置一个 default.conf,server_name 设置为 localhost,如果有其他非法域名 A 记录到该机器上,则返回默认的 Nginx 页面server { listen 80; server_name localhost; #chars
阅读全文
摘要:#nginx1.12 centos6.xuser admin admin;worker_processes 4; error_log /data/services/logs/nginx_error.log;pid /data/services/run/nginx.pid; worker_rlimit
阅读全文
摘要:#nginx1.14 centos7# For more information on configuration, see:# * Official English Documentation: http://nginx.org/en/docs/# * Official Russian Docum
阅读全文
摘要:#这里的test.com要与proxy_pass http://test.com 一至!upstream test.com { ip_hash; server 172.16.0.20:80; server 172.16.0.30:80;} upstream html.com{ server 172.
阅读全文
摘要:server_tokens off; #并不会让nginx执行的速度更快,关闭它可隐藏错误页面中的nginx版本号charset utf-8,gbk; #字符#sendfile on;#tcp_nopush on; #在一个数据包里发送所有头文件,而不一个接一个的发送#tcp_nodelay on;
阅读全文
摘要:企业动静分离写法:location ~*\.(html|gif|jpg|jpeg|ico|swf|htm|xml)$ {proxy_pass http://10.0.10.62:80;}location ~ .*.jsp$ {index index.jsp;proxy_pass http://127
阅读全文
摘要:1. /usr/local/nginx/sbin/nginx -V 查看nginx版本与编译安装了哪些模块nginx version: nginx/1.10.3built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)built with OpenSSL
阅读全文
摘要:Nginx PHP+NFS MySql 192.168.56.202 192.168.56.201 192.168.56.200安装MySql安装Nginx[root@localhost nginx-1.6.0]# ./configure --prefix=/usr/local/nginx --us
阅读全文
摘要:也可以生成json:goaccess -q -f web.log -a -p /home/yejianfeng/.goaccessrc -o json >test.json 和csvgoaccess -q -f web.log -a -p /home/yejianfeng/.goaccessrc -
阅读全文
摘要:Nginx代理MySql集群本次实验采用nginx 版本1.12以上 集合了tcp代理功能只需在编译时明文开启指定的功能 --with-stream--prefix=/usr/local/ngin --user=nginx --group=nginx --with-http_stub_status_
阅读全文
摘要:Nginx代理MysqlCluster 公司有一个公网ip,有公网ip(222.222.222.222)那台服务器上装的nginx,mysql装在公司另外一台服务器上假设ip为192.168.0.7,我想利用公网ip去访问内网电脑上mysql就可以利用我下面的配置操作了nginx1.9及以上才可以支
阅读全文
摘要:nx-Cluster and ReverseProxyServer ReProxy Client 192.168.56.202 nginx 192.168.56.200 nginx+phpMyAdmin| 192.168.56.201 nginxnginx 这个轻量级、高性能的 web server
阅读全文
摘要:ReProxy Client 192.168.56.200 nginx+keepalived 192.168.56.202 nginx192.168.56.201 nginx+keepalived 1、编译安装Nginx[root@localhost ~]# yum -y install pcre-
阅读全文
摘要:ReProxy Client 192.168.56.202 nginx 192.168.56.200 Tomcat| 192.168.56.201 Tomcat 1、配置Tomcat:注:Client 两个客户端配置相同 安装JDK[root@localhost ~]# tar -zxvf jdk-
阅读全文
摘要:$args #请求中的参数值$query_string #同 $args$arg_NAME #GET请求中NAME的值$is_args #如果请求中有参数,值为"?",否则为空字符串$uri #请求中的当前URI(不带请求参数,参数位于$args),可以不同于浏览器传递的$request_uri的值
阅读全文
摘要:#!/bin/bash#此脚本用于自动分割Nginx的日志,包括access.log和error.log#每天00:00执行此脚本 将前一天的access.log重命名为access-xxxx-xx-xx.log格式,并重新打开日志文件#Nginx日志文件所在目录LOG_PATH=/data/ser
阅读全文
摘要:环境为Centos7 nginx1.14 mysql5.7 php7一,安装Nginx (yum装,快速) yum install nginx二,优化nginx (方便后期工作,如果纯为测试的话,不用)1, cat nginx.conf user www;worker_processes auto;
阅读全文


浙公网安备 33010602011771号