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等
Nginx.conf 配置安全优化 Nginx 是一款轻量级的 Web 服务器,相比 Apache,Nginx 具有更好的性能和更少的系统资源占用。下面我们将对 Nginx.conf 配置文件进行详细的介绍,并讨论其安全优化方法。 Nginx 和 Apache...
nginx1.21.5 nginx.conf配置文件
nginx.conf配置文件下载
Nginx配置文件(nginx.conf)配置详解 Nginx配置文件(nginx.conf)是Nginx服务器的核心配置文件,用于定义Nginx服务器的行为和配置。下面是Nginx配置文件的详细配置解释: 用户和组 Nginx配置文件中指定了用户和组,...
Notepad++ 自定义 nginx.conf 文件语法高亮的配置文件 使用教程:点击语言-自定义语言格式-导入(下载的xml文件)-重启notepad++,即可使用
这是nginx安装时需要的文件之一nginx.conf
nginx.conf例子 多域名配置例子
django项目上线时完整的nginx.conf文件,直接覆盖上去,修改域名和项目路径就OK了,直接拿走就好,详细部署上线流程我的博客里油介绍
本资源是专门针对本博文的, nginx的反向代理的简单配置文件,给大家使用时做参考,拿走不谢,怎么一定要50字呢?
**Nginx与Nginx.conf配置详解** Nginx是一款高性能、轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,以其稳定性高、性能出色、配置简单以及占用资源少等优点,在互联网行业中被广泛应用。...
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配置详解》 Nginx是一款高性能、轻量级的Web服务器和反向代理服务器,因其高效稳定和灵活的配置而备受青睐。本文将深入解析Nginx的核心配置文件`nginx.conf`,帮助读者理解其背后的运行机制和配置选项...
nginx.conf的配置访问ssl证书
nginx.conf 例子
nginx配置文件,nginx代理配置