nginx+tomcat反向代理負載均衡配置
1、nginx的安裝和配置見:http://www.cnblogs.com/ll409546297/p/6795362.html
2、tomcat部署專案到對應的伺服器上面並啟動,不詳解
3、在nginx中配置nginx.conf檔案:
user nobody; worker_processes 4; #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; # `"$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 tomcat_client { #針對於8080埠實現 ip_hash; server localhost:8080; #如果存在多個部署,寫入地址和埠即可 } server { listen 80; server_name localhost; #本地訪問名稱可以修改,針對於外網可以寫成域名 #charset koi8-r; #access_log logs/host.access.log main; location / { proxy_pass http://tomcat_client; proxy_redirect default; #設定代理 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
4、啟動nginx就可以訪問自己的專案
相關文章
- nginx+tomcat實現反向代理+負載均衡NginxTomcat負載
- docker下nginx反向代理和負載均衡配置DockerNginx負載
- 秒懂負載均衡與反向代理負載
- nginx詳解反向代理負載均衡Nginx負載
- 代理與反向代理、負載均衡和快取負載快取
- nginx+tomcat負載均衡配置 火推NginxTomcat負載
- Nginx負載均衡反向代理伺服器Nginx負載伺服器
- [原創]Nginx反向代理及負載均衡Nginx負載
- 【Nginx】Nginx反向代理和負載均衡部署Nginx負載
- centos7下配置nginx反向代理負載均衡叢集CentOSNginx負載
- Apache配置反向代理、負載均衡和叢集(mod_proxy方式)Apache負載
- Nginx入門(2)反向代理和負載均衡Nginx負載
- Nginx反向代理負載均衡的容器化部署Nginx負載
- 介紹下Nginx 反向代理與負載均衡Nginx負載
- Nginx+Tomcat部署負載均衡NginxTomcat負載
- nginx面試題-nginx負載均衡與正反向代理Nginx面試題負載
- nginx反向代理和負載均衡策略實戰案例Nginx負載
- Nginx 全模組安裝及匹配方式、反向代理和負載均衡配置Nginx負載
- nginx+tomcat實現負載均衡NginxTomcat負載
- Nginx伺服器的使用與反向代理負載均衡Nginx伺服器負載
- Nginx反向代理+負載均衡簡單實現(https方式)Nginx負載HTTP
- nginx反向代理負載均衡與動靜頁面分離Nginx負載
- Nginx搭建反向代理負載均衡和web快取伺服器Nginx負載Web快取伺服器
- 誰說前端不需要懂-Nginx反向代理與負載均衡前端Nginx負載
- 【SpringCloud】(十五):Zuul的基本應用,反向代理和負載均衡SpringGCCloudZuul負載
- 代理和負載均衡概述負載
- 如何使用 Weave 以及 Docker 搭建 Nginx 反向代理/負載均衡伺服器DockerNginx負載伺服器
- nginx之 nginx-1.9.7 + tomcat-8.5.15 反向代理+應用負載均衡 安裝配置NginxTomcat負載
- Nginx+tomcat實現叢集跟負載均衡NginxTomcat負載
- Nginx+tomcat實現叢集和負載均衡NginxTomcat負載
- Flume負載均衡配置負載
- apache 負載均衡配置Apache負載
- 圖解Nginx,系統架構演變 + Nginx反向代理與負載均衡圖解Nginx架構負載
- Linux下Nginx+Tomcat負載均衡和動靜分離配置要點LinuxNginxTomcat負載
- nginx反向代理負載均衡帶你突破單臺伺服器的瓶頸Nginx負載伺服器
- 在windows環境下 nginx + .net core 3.1 實現反向代理和負載均衡WindowsNginx負載
- 在Linux中,nginx反向代理和負載均衡實現原理是什麼?LinuxNginx負載
- 配置IIS的負載均衡負載