nginx反向代理服务器调优
来源:互联网 发布:淘宝离线自动发货 编辑:程序博客网 时间:2024/06/03 09:57
#user nobody;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; upstream local_tomcat {server localhost:8081;server localhost:8082;
#ip_hash虽然能够解决访问速度慢的问题,但是在一台主机出现问题以后并不能将请求转发到另一台上,因此不建议使用。ip_hash; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {# root html;# index index.html index.htm; proxy_pass http://local_tomcat;proxy_read_timeout 40000;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade"; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #}}
0 0
- nginx反向代理服务器调优
- Nginx--HTTP反向代理服务器
- nginx作为反向代理服务器
- Nginx反向代理服务器详解
- Nginx搭建反向代理服务器
- Nginx代理服务器反向代理
- nginx反向代理服务器图解
- NGINX反向代理服务器
- nginx反向代理服务器
- Nginx 搭建反向代理服务器
- Nginx用作反向代理服务器使用!
- nginx反向代理服务器端口问题
- nginx反向代理服务器端口问题
- Nginx用作反向代理服务器使用
- nginx apache 配置反向代理服务器
- Nginx反向代理服务器+负载均衡
- 借助Nginx搭建反向代理服务器
- Nginx——反向代理服务器
- ios申请真机调试( xcode 5)详细解析
- linux 下手动安装 gcc
- beanshell 线上修复BUG
- hdu 5115 Dire Wolf【区间dp】
- 基于Flume的美团日志收集系统(一)架构和设计
- nginx反向代理服务器调优
- 求二叉树的叶节点
- 网络流二十四题之三 —— 最小路径覆盖问题(PATH)
- 基于Flume的美团日志收集系统(二)改进和优化
- 序列化二叉树
- 第四次_Activity传递参数
- Eclispse Ctl+shift+f 将默认行数80变为120
- 对于函数的编程规范的看法(后期会有补充)
- CreateProcess的用法