I'm running Nginx Tomcat Apache2 Kibana Grok and Graphite on single server.
tomcat serves grok apache2 serves graphite nginx listen on port 80 and redirect.
My configuration is:
server {
listen 443 ssl default_server;
listen 80;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
server_name myserver.org;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
root /var/www/html/;
location / {
alias /var/lib/tomcat8/webapps/;
proxy_pass http://127.0.0.1:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 5;
proxy_send_timeout 30;
proxy_read_timeout 30;
}
location /kibana/ {
proxy_ignore_client_abort on;
proxy_pass http://localhost:5601/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
location /graphite/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:81/;
}
}
Requests to localhost/kibana/ work fine.
Requests to localhost/graphite/ are served by tomcat instead of apache2.
If i go to localhost:81 my graphite is loaded.
What is wrong here?
tomcat serves grok apache2 serves graphite nginx listen on port 80 and redirect.
My configuration is:
server {
listen 443 ssl default_server;
listen 80;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
server_name myserver.org;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
root /var/www/html/;
location / {
alias /var/lib/tomcat8/webapps/;
proxy_pass http://127.0.0.1:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 5;
proxy_send_timeout 30;
proxy_read_timeout 30;
}
location /kibana/ {
proxy_ignore_client_abort on;
proxy_pass http://localhost:5601/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
location /graphite/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:81/;
}
}
Requests to localhost/kibana/ work fine.
Requests to localhost/graphite/ are served by tomcat instead of apache2.
If i go to localhost:81 my graphite is loaded.
What is wrong here?