nginx 负载均衡配置方法 nginx.conf
来源:互联网 发布:27世纪人工智能系统gif 编辑:程序博客网 时间:2024/05/17 08:34
#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;
#均衡服务器
server 192.168.3.28:51;
server 192.168.3.28:52;
server 192.168.3.28:54;
server 192.168.1.167:55;
}
server {
listen 8089;
server_name 192.168.3.28;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://www.g.cn;
proxy_redirect default;
root html;
index index.html index.htm Default.aspx;
}
#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;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
- nginx 负载均衡配置方法 nginx.conf
- Nginx负载均衡conf配置
- nginx.conf负载均衡配置
- nginx + tomcat 实现负载均衡配置 nginx.conf配置
- nginx负载均衡配置方法
- nginx 配置nginx.conf,负载均衡,逻辑分流
- nginx.conf详细说明和负载均衡配置
- nginx 负载均衡配置
- nginx配置负载均衡
- nginx负载均衡配置
- Nginx负载均衡配置
- Nginx负载均衡配置
- Nginx负载均衡配置
- nginx负载均衡配置
- Nginx 负载均衡配置
- nginx负载均衡配置
- nginx负载均衡配置
- nginx负载均衡配置
- Spring整合Hibernate
- 有说服力的写作:驾驭文字的艺术
- android之输入内容会进行联想并且消除重复项
- C# 控制 Webcam [using Emgu]
- 去掉字符串空格
- nginx 负载均衡配置方法 nginx.conf
- 跟老程序员的谈话
- bash:alias 只能再交互界面用,不能在shell脚本中使用
- 浅谈Android中Callback(回调)的使用
- 黑马程序员---黑马笔记(一些基础类)
- ubuntu中取消文件夹或文件等右下解一把锁的标志的方法
- 杭电2138
- Entity Framework 4.1 Code First 学习之路(一)
- 【算法】邮件分类的难题--一致性哈希算法