Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [502]

HTTP Error 502 Bad gateway

Filter by
Sorted by
Tagged with
1 vote
0 answers
316 views

NGINX 502 Bad Gateway error inside Docker container

I haven't had any issues with my Docker container or NGINX until today where I am getting a random unexpected 502 Bad Gateway error even though I have made no changes to my configuration files, Docker ...
user avatar
0 votes
0 answers
170 views

Error 502: Deploy Django application with Gunicorn and Nginx

I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack: Ubuntu (20.04) Django (3.0.7) ...
user avatar
0 votes
0 answers
178 views

nginx always serves 502 Bad Gateway

I am trying to run a proxy with Nginx and I implemented the following tutorial as preparation. I did exactly as instructed here and I was served a 502 Bad Gateway result when I entered http://develop....
user avatar
  • 127
1 vote
0 answers
95 views

Why would TLS version in one config cause another to break?

I have an Apache proxy that has several VHosts. Some of these are legacy configs that were before my time. Long story short, I removed some .crt files on the server that had expired, and forgot to ...
user avatar
0 votes
1 answer
2k views

AWS Load Balancer 502 Bad Gateway

I have multiple node web servers hosted on EC2 with a Load Balancer, and some users are getting a 502 even before the request reaches the server. I don't have the logs of those requests inside the ...
user avatar
  • 101
1 vote
1 answer
400 views

Installing Matomo on Nginx returns 502 Bad Gateway Error

I'm in the process of installing the Matomo Analytics platform on my Debian 10 server, running Nginx and using the Cloudflare DNS and CDN. Unfortunately I get a 502 Bad Gateway error when trying to ...
user avatar
0 votes
0 answers
121 views

apache web server 502 error proxy error when direct to an image url

Good day, I have an Apache web server, and I configure ProxyPass it to my application server. Everything is work unless the connection to the image in application server. I will hit 502 for the ...
user avatar
0 votes
2 answers
831 views

nginx proxy server 502 Bad Gateway

First of all, forgive me if I say something stupid, I have no experience with server administration but I've been assigned this task. For our webapp we want to set up a proxy server so that clients ...
user avatar
  • 101
0 votes
2 answers
59 views

After Ubuntu 14.04 -> 16.04 upgrade, pypMyAdmin retuns 502 error on nginx

So I just upgraded my VPS from 14.04 to 16.04, the upgrade went well for most parts, but MySQL failed to update. I needed to manually remove mariadb-client first, and then I was able to install MySQL ...
user avatar
  • 9
1 vote
1 answer
1k views

Change error page for 502 Bad Gateway error Nginx not working

I have researched online for a means to change the error page when running into a 502 Bad Gateway error. I have tried all the methods given to no avail. I looked in the nginx.conf file and saw that it ...
user avatar
0 votes
1 answer
482 views

nginx reverse proxy SSL [duplicate]

Goals: Have a single nginx reverse proxy for all sub-sites (running on other ports). BLOCK all direct connections, and instead; route through nginx. Problem(s): 502 gateway errors when trying to ...
user avatar
1 vote
0 answers
14 views

nginx 502 bad gateway with nodejs [duplicate]

i am an student who is working on a nodejs + nginx project taht i didn't start, so im not sure what is going on.... when i try accessing to my website, i am recibing a 502 Bad Gateway nginx/1.12.2 ...
user avatar
  • 11
2 votes
1 answer
24k views

failed (111: Connection refused) while connecting to upstream python [duplicate]

I am experiencing 502 Bad Gateway errors after deploying a python flask application using dokku on digital ocean. I followed this tutorial to deploy my app on digital ocean using dokku. 2018/10/23 07:...
user avatar
0 votes
1 answer
2k views

502 Bad Gateway on localhost Apache

I'm trying to run a Drupal 7 multi-site install on my Mac (10.12.6). My directory setup: ~/Sites/index.html ~/Sites/drupal/docroot/sites/site1 ~/Sites/drupal/docroot/sites/site2 My /etc/hosts: 127....
user avatar
0 votes
1 answer
2k views

Almost all the http APIs return a 502 bad gateway error after adding a CDN

I just added my website to a CDN provider https://www.qiniu.com/en. Then I realised that almost all my http APIs (https://www.funfun.ink/httpOnly...) returned a 502 bad gateway error. Additionally, ...
user avatar
  • 223
0 votes
1 answer
566 views

502 error returned from nginx reverse proxy rewrite on some networks

I am getting connection timed out - 502 when connecting from one Internet connection (wifi 4g connection tried with different devices and browsers) while the server works perfectly on VPN, and ...
user avatar
0 votes
1 answer
403 views

Nginx 502 error after updating Ubuntu 12.10 to 14.04?

I had a particularly outdated ubuntu distribution (12.10) and was beginning the process to update sequentially to 16.04. Yesterday, I successfully updated from 12.10->13.10->14.04 using the Ubuntu old ...
user avatar
0 votes
0 answers
598 views

HTTP 502 (Bad Gateway), niginx connect() to 127.0.0.1:8889 failed (99: Cannot assign requested address) while connecting to upstream

We have a server application running behind nginx, and the client side will keep getting and writing data to it through HTTP request but should return really fast. After running sometime, client side ...
user avatar
1 vote
1 answer
4k views

Nginx CentOS 7 PHP-FPM 7 502 Bad Gateway

I have configured Nginx, PHP-FPM 7 on CentOS 7. I am now having a 502 error. In www.conf: user and group are nginx. listen = /var/run/php-fpm.sock listen.owner = nginx listen.group = nginx listen....
user avatar
  • 11
1 vote
1 answer
924 views

502 error when wordpress site hosted on AWS, but not Google cloud

I've got a problem with my wordpress site that means I get a 502 bad gateway error. The site is hosted on AWS (EC2 instance). I migrated the site to a google cloud instance to test if that would ...
user avatar
  • 21
-1 votes
0 answers
937 views

centOS 7 nginx 502 bad gateway error [closed]

im using VPS with 2 cores 3GB ram 1.5GB swap i been using nginx for more than year and i have not had any problem, nginx only uses between 300 to 700MB ram only my website is not so busy i get between ...
user avatar
  • 1
0 votes
1 answer
1k views

Nginx Error 502 when uploading large images

The environment: Fresh install of Ubuntu 16.04 on a 256MB VPS LEMP stack with PHP 7.1 Latest WordPress install with Avada theme & associated plugins only. At least 75MB of RAM free when not ...
user avatar
  • 3
3 votes
1 answer
11k views

Nexus returns error 502 (Bad Gateway) when publishing artifacts

I've just completed the installation of Sonatype Nexus 3.2.1-01 and I'm trying to publish some artifacts using a Jenkins job and the Nexus Artifact Uploader 2.9 plugin. The upload starts fine: 100 % ...
user avatar
  • 161
1 vote
1 answer
13k views

502 bad gateway nginx and apache servers

Hello there can you please help me im trying to setup apache and nginx server on my ubuntu 16.04 server, but when i try to visit localhost/info.php fo example im getting 502 Bad Gateway nginx/1.9....
user avatar
  • 123
1 vote
1 answer
3k views

Recurrent 502, 504 errors despite low cpu and memory usage

I'm struggling with this problem since quite a while. I have t2.site instance on AWS hosting a very low traffic personal website built with wordpress, nothing extraordinary. I first used Apache2, and ...
user avatar
0 votes
0 answers
953 views

Multiple Gunicorn daemons for Django projects with Nginx result in 502 Bad Gateway for one

I want to run two Django applications on the same server, with Nginx and Gunicorn. I can run them separately, but not both at the same time: When I try, one is OK, but for the other one I receive 502. ...
user avatar
0 votes
1 answer
2k views

nginx - 502 Bad Gateway ubuntu 14.04 aws ec2 django project + gunicorn

I'm trying to get my django project up and running on an aws ec2 instance. I'm using gunicorn with nginx, and I'm not really sure how I can tackle this problem. I've spent a couple hours on it already,...
user avatar
0 votes
2 answers
3k views

UWSGI Bad Gateway - Connection refused while connecting to upstream

Trying to get a basic Django app running on nginx using UWSGI. I keep getting a 502 error with the error in the subject line. I am doing all of this as root, which I know is bad practice, but I am ...
user avatar
-2 votes
1 answer
1k views

nginx (latest) is not working together with spawn-fcgi

My OS: Debian 7 (latest) x64 My Domain: www.DeadalusHD.com My nginx-vhost: server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## ...
user avatar
  • 23
1 vote
0 answers
271 views

Openshift proxy timeout

I have an application hosted with Openshift and I need it to generate some Excel reports. The report generation process can take a long time (over 5 minutes). This causes the the client to see a 502 ...
user avatar
-1 votes
1 answer
2k views

502 bad gateway after upgrading PHP5-FPM

I just upgraded php-fpm and my server has gone away with a 502 bad gateway I've been searching for solutions and came across some like this: https://stackoverflow.com/a/10470827/1612432 and this ...
user avatar
-1 votes
1 answer
2k views

Facebook error parsing input URL error 502 Bad Gateway

Any time when someone shares my website link onto facebook or twitter they get 502 Bad Gate way. I check the nginx error log to see whats going on and I got this. error1615#0: *2375 connect() failed ...
user avatar
0 votes
2 answers
3k views

502 bad gateway when trying to log out through nginx reverse proxy

When I try to log out my php application, the nginx reverse proxy throws a 502 bad gateway error. The error log shows this error: [error] 20284#0: *1 upstream sent too big header while reading ...
user avatar
3 votes
3 answers
8k views

NGINX Proxy Pass to NodeJS App: Returning 502 error

I'm trying to setup NGINX as the frontend of my NodeJS app, which is live on 127.0.0.1:3000, but i can't resolve this 502 error. NGINX is locally reachable at http://55.55.55.5/ or http://dev.example ...
user avatar
  • 31
2 votes
1 answer
8k views

Nginx + PHP-FPM on Centos 6.5 gives me 502 Bad Gateway (fpm error: unable to read what child say: Bad file descriptor)

I am setting up a standard LEMP stack. My current setup is giving me the following error: 502 Bad Gateway This is what is currently installed on my server: Here's the configurations I've created/...
user avatar
  • 347
1 vote
2 answers
5k views

502 Bad Gateway Nginx

When I try to view my website homepage I get the following error dislayed: 502 Bad Gateway Nginx The error log found at /var/log/nginx shows the message: *2014/04/21 10:30:39 [error] 3807#0: 228 ...
user avatar
  • 31
21 votes
3 answers
86k views

nginx : no live upstreams while connecting to upstream

502 bad gateway error displayed when switching between site pages and some times on home page but not for the first request on the home page it is only when another page redirect to it. and it happens ...
user avatar
-3 votes
1 answer
995 views

nginx with php-fpm got 502 bad gateway on ubuntu server 12.04 [closed]

I just don't know why i got a 502 error. Please help. you can visit here http://upliu.net/phpinfo.php phpinfo.php just has one line code: phpinfo(); but i got a 502 bad gateway error someone can help ?...
user avatar
4 votes
2 answers
16k views

Nginx 502 bad gateway runing django in uwsgi

I tryed to restart a project in production and it stoped working. This is a django==1.5.1 and django-cms==2.4.1 project. I restarted because I've updated the project from django==1.4.1 to django==1.5....
user avatar
  • 193
5 votes
1 answer
6k views

nginx+ uwsgi gives 502 Bad Gateway

I used this guide to set it up and it was working to server my django app for a while, but after adding a new django module, without touching any of the nginx or uwsgi configs, now the server leads to ...
user avatar
  • 2,997
2 votes
3 answers
7k views

Custom page on 502 Bad Gateway error

I want to use Nginx as a simple reverse proxy, but if the server behind Nginx is down I just was to display a blank page. For some reason this configuration isn't displaying a blank page on error 502 ...
user avatar
3 votes
3 answers
3k views

NginX & PHP-FPM, random 502

2010/09/19 14:52:07 [error] 1419#0: *10220 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [...], server: [...], request: "POST /[...] HTTP/1.1", ...
user avatar
  • 477
7 votes
1 answer
12k views

Simulate 502 & 504 on nginx

Is there any way to simulate these errors? I created some custom files for it, but I want to be sure that are displayed correctly. I made different message for every vhost. Thank you in advance.
user avatar
  • 708