user webuser webuser; worker_processes 8; events { use epoll; worker_connections 4096; } 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"'; upstream parkingcust { ip_hash; server 192.168.73.50:1011; server 192.168.73.51:1011; server 192.168.73.52:1011; } upstream parkingadmin { ip_hash; server 192.168.73.50:1021; server 192.168.73.51:1021; server 192.168.73.52:1021; } upstream parkinglot { ip_hash; server 192.168.73.50:1031; server 192.168.73.51:1031; server 192.168.73.52:1031; } upstream parkingPlatform { ip_hash; server 192.168.73.50:1051; server 192.168.73.51:1051; server 192.168.73.52:1051; } upstream parkingcust1 { ip_hash; server 192.168.73.50:1012; server 192.168.73.51:1012; server 192.168.73.52:1012; } upstream parkingphone { ip_hash; server 192.168.73.50:1061; server 192.168.73.51:1061; server 192.168.73.52:1061; } upstream parkingcustwx { ip_hash; server 192.168.73.51:11011; } #access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; server { listen 80; server_name p.ichuxing.cc; index index_tel.jsp index.jsp index.html index.htm login.jsp *.css; location / { index index.html index.htm; proxy_pass http://192.168.73.50:1091/; } location /parkingcust/ { index index.html index.htm; proxy_pass http://parkingcust; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /parkingadmin/ { index index.jsp index.html index.htm *.css; proxy_pass http://parkingadmin; } location /parkinglot/ { index index_tel.jsp index.jsp index.html index.htm *.css; proxy_pass http://parkinglot; } location /parkingPlatform/ { index index_tel.jsp index.jsp index.html index.htm *.css; proxy_pass http://parkingPlatform; } location /parkingcust1/ { index index_tel.jsp index.jsp index.html index.htm *.css; proxy_pass http://parkingcust1; } location /parkingphone/{ index index_tel.jsp index.jsp index.html index.htm *.css; proxy_pass http://parkingphone; } location /parkingcustwx/{ index index_tel.jsp index.jps index.html index.htm *.css; proxy_pass http://parkingcustwx; } #location /nginx_status { # stub_status on; # access_log off; #} } }
#user nobody; worker_processes 8; #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; proxy_redirect off; proxy_set_header Host $http_host; #proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 36000; proxy_buffer_size 4k; proxy_buffers 4 2m; proxy_busy_buffers_size 3m; proxy_temp_file_write_size 2m; server_names_hash_bucket_size 128; #gzip on; #gzip_types text/css text/javascript application/x-javascript; #sendfile on; tcp_nopush on; tcp_nodelay on; client_body_timeout 30; #keepalive_timeout 60; client_header_buffer_size 8k; large_client_header_buffers 4 32k; server { listen 80; server_name 192.168.73.106; index index_tel.jsp index.jsp index.html index.htm login.jsp *.css; # location /parkingcustwx/ { # index index_tel.jsp index.jsp index.html index.htm; # proxy_pass http://192.168.73.104:1011/parkingcustwx/; # } # # # location /parkingadmin/ { # index index_tel.jsp index.jsp index.html index.htm; # proxy_pass http://192.168.73.104:1021/parkingadmin/; # } # # # location /parkinglot/ { # index index_tel.jsp index.jsp index.html index.htm; # proxy_pass http://192.168.73.104:1031/parkinglot/; # } location /centerumms/ { index index_tel.jsp index.jsp index.html index.htm; proxy_pass http://192.168.73.106:8882/centerumms/; } } }
相关推荐
nginx.conf配置文件,反向代理,负载均衡--轮询、权重、IPHASH等
nginx1.21.5 nginx.conf配置文件
Notepad++ 自定义 nginx.conf 文件语法高亮的配置文件 使用教程:点击语言-自定义语言格式-导入(下载的xml文件)-重启notepad++,即可使用
这是nginx安装时需要的文件之一nginx.conf
nginx.conf配置文件下载
nginx.conf例子 多域名配置例子
Nginx配置文件(nginx.conf)配置详解[定义].pdf
nginx.conf已经配置到了D:\\ftp目录,可自行更改,双击start.cmd 启动服务,stop.cmd关闭服务,其他电脑可以通过 ftp://ip/文件名 来访问服务器D盘ftp下文件
django项目上线时完整的nginx.conf文件,直接覆盖上去,修改域名和项目路径就OK了,直接拿走就好,详细部署上线流程我的博客里油介绍
本资源是专门针对本博文的, nginx的反向代理的简单配置文件,给大家使用时做参考,拿走不谢,怎么一定要50字呢?
1、对nginx中的一些经典节点注释。2、节点有user、worker_processes、error_log、pid、worker_rlimit_nofile、worker_connections、multi_accept、use、include、default_type、client_header_buffer_size、upstream...
nginx.conf的配置访问ssl证书
nginx.conf 例子
nginx配置文件,nginx代理配置
nginx nginx.conf配置文件,下载后请根据自己的实际环境做相应的修改
整理出一份比较全的nginx配置的详细,其中注明了比较常用到的一些配置说明,希望对初学者有帮助