I am following the bootstrap to install redash on my centos box locally. Currently I am facing a “502 Bad Gateway” error from my browser (server ip in the address bar) . Sounds like a nginx configuration error, any one here could show me a working example of nginx.conf? Or someone could point me a possible reason for this situation?
Thanks!
MY redash service should be running on port 5000.
curl 127.0.0.1:5000 would show me:
Redirecting...Redirecting...
You should be redirected automatically to target URL: /login?next=http%3A%2F%2F127.0.0.1%3A5000%2F. If not click the link.[ro...
supervisorctl status
redash_celery RUNNING pid 18586, uptime 1:21:26
redash_celery_scheduled RUNNING pid 18548, uptime 1:21:28
redash_server RUNNING pid 18539, uptime 1:21:28My current /etc/nginx/nginx.conf is:
cat /etc/nginx/nginx.confuser redash;
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; include /etc/nginx/sites-enabled/redash/*;
}
content of nginx_redash_site.conf
cat /etc/nginx/sites-enabled/redash/nginx_redash_site.conf
upstream rd_servers {
server 127.0.0.1:5000;
}server {
server_tokens off;
listen 80 default;
listen [::]:80 default;access_log /var/log/nginx/rd.access.log;
gzip on;
gzip_types *;
gzip_proxied any;location / {
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;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://rd_servers;
}
}