Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

I get 502 Bad Gateway with nginx example config file #378

Open
ezgoProject opened this issue Sep 16, 2018 · 5 comments
Open

I get 502 Bad Gateway with nginx example config file #378

ezgoProject opened this issue Sep 16, 2018 · 5 comments

Comments

@ezgoProject
Copy link

I only change the port from 8080 to my 8188. That's the only changes.

@ezgoProject
Copy link
Author

server {
listen 80;

root /var/www/zcash;

index index.html index.htm index.nginx-debian.html;

location / {
	try_files $uri $uri/ =404;
}

location ~ .$ {
	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header X-Forwarded-For $remote_addr;
	proxy_set_header Host $host;
	proxy_pass http://127.0.0.1:8188;
}

}

@ezgoProject
Copy link
Author

It works fine if I add 8188 behind url. like zec.mychainpools.com:8188

@ezgoProject
Copy link
Author

ezgoProject commented Sep 16, 2018

I also tried something like this

server {
listen 80;
server_name zec.mychainpools.com;
return 301 https://$host$request_uri;
}
server {

 listen 443 ssl http2;
server_name zec.mychainpools.com www.zec.mychainpools.com;
ssl_certificate       path/fullchain.pem; # managed by Certbot
ssl_certificate_key  path/privkey.pem; # managed by Certbot
ssl_trusted_certificate / path/fullchain.pem;
include /etc/nginx/snippets/ssl-params.conf;


root /var/www/zcash;


index index.html index.htm index.nginx-debian.html;


location / {


	try_files $uri $uri/ =404;

}
location ~ .$ {

   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_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;
    proxy_read_timeout 5m;
    proxy_connect_timeout 5m;
    proxy_pass http://127.0.0.1:8188;
   
	
 }

@ezgoProject
Copy link
Author

ezgoProject commented Sep 17, 2018

I got this.
image
404 for all other pages

@rlinxy
Copy link

rlinxy commented Nov 15, 2018

have you solved this? Got same problem :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants