nginx
文章平均质量分 62
张永光
这个作者很懒,什么都没留下…
展开
-
负载平衡
浏览器 –> nginx –> Tomcat1.代理转发location / { # root html; index index.html index.htm; proxy-pass http://192.168.1.62:8080; #代理转发}2.nginx策略nginx --> 策略 Tomcat1原创 2018-01-30 12:37:25 · 28047 阅读 · 0 评论 -
nginx跨域请求
nginx跨域请求 Access-Control-Allow-Origin *当出现403跨域错误’Access-Control-Allow-Origin’,需要给Nginx服务器配置响应的header参数解决方法#修改nginx.conf文件server { add_header Access-Control-Allow-Origin *; add_header原创 2018-01-30 12:37:29 · 29269 阅读 · 0 评论 -
nginx基本设置
运行用户user nobody;#启动进程,通常设置成和cpu的数量相等worker_processes 1;#全局错误日志及PID文件#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs原创 2018-01-30 12:37:32 · 30459 阅读 · 0 评论 -
centos6.5安装keepalived
环境准备# 安装nc工具,方便检测端口yum install nc# 安装keepalivedyum install keepalived# 开启keepalived服务chkconfig keepalived on设置cd /etc/keepalivedcp keepalived.conf keepalived.conf.bk# ifconfig 查看ip对应的网原创 2018-01-30 12:37:37 · 33201 阅读 · 0 评论 -
centos7安装nginx
环境准备yum -y install gcc-c yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel下载nginxwget http://nginx.org/download/nginx-1.7.4.tar.gz安装nginxtar -zxvf nginx-1.7.4.tar原创 2018-01-30 12:37:40 · 36071 阅读 · 0 评论 -
nginx超时
超时设置http{ keepalive_timeout 600; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; client_header_timeout 600; client_body_timeout 600;}client_原创 2018-01-30 12:37:45 · 45042 阅读 · 0 评论