- #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;
- #kafka监控
- server {
- listen 9921; #外网端口
- server_name kafkaOffsetServer; #服务名
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.49:8089; #端口对应集群服务页面地址
- }
- #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;
- }
- }
- #hdfs服务
- server {
- listen 9922;
- server_name hadoopHdfsServer;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.40:50070;
- }
- #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;
- }
- }
- #yarn服务
- server {
- listen 9923; #外网端口
- server_name yarnServer; #服务名
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.39:8088; #端口对应集群服务页面地址
- }
- #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;
- }
- }
- #jobHistory服务
- server {
- listen 9924; #外网端口
- server_name jobHistoryServer; #服务名
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.41:19888; #端口对应集群服务页面地址
- }
- #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;
- }
- }
- #hue服务
- server {
- listen 9925; #外网端口
- server_name hueServer; #服务名
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.44:8888; #端口对应集群服务页面地址
- }
- #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;
- }
- }
- #oozie服务
- server {
- listen 9926; #外网端口
- server_name oozieServer; #服务名
- #charset koi8-r;
- #access_log logs/host.access.log main;
- #location / {
- #root html;
- #index index.html index.htm;
- #}
- location / {
- proxy_pass http://10.2.20.69:11000; #端口对应集群服务页面地址
- }
- #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;
- }
- }
- }
linux-centos-nginx.conf配置负载均衡
猜你喜欢
转载自blog.csdn.net/qq_30245135/article/details/80170102
今日推荐
周排行