Questions tagged [502-error]

HTTP Error 502 Bad gateway

Filter by
Sorted by
Tagged with
0 votes
0 answers
83 views

Configuring Nginx Reverse Proxy: Resolving Bad Gateway Issue

I am attempting to set up an Nginx reverse proxy that should be accessible from another server. The purpose is to redirect requests to an upstream test environment. The connection necessitates a ...
Radoslav Enev's user avatar
0 votes
0 answers
372 views

502 Bad Gateway when using NginX proxy_pass for subdomain on different LAN server

In a nutshell, I want to host a second domain (sub.domain.com) on a different server, on the same network (192.168.1.240). I understand I have to make use of the proxy_pass, so I have this ...
Johnny Bravo's user avatar
0 votes
0 answers
150 views

kubernetes responding with 502

I have a cluster running 2 deployments and an ingress (caddy). One of my deployments is working fine, its a golang image listening on 80. The other deployment is a php-fpm image listening on 9000, ...
wcb's user avatar
  • 1
0 votes
0 answers
619 views

Bad Gateway 502.3 error when using ARR in IIS

We are experiencing issues with ARR configuration when trying to proxy requests to an external web site. Our server configuration is as follows: Web server with IIS 7.5 that we control. It runs a few ...
Mooh's user avatar
  • 131
0 votes
0 answers
561 views

Magento 2 running on Ubuntu 20.04 with Nginx returns Bad Gateway Error code 502

I have a fresh install of Magento 2.4.4-p2 on Ubuntu 20.04. The PHP version is 8.1.13 and the nginx version is 1.18.0 (Ubuntu). I can see and access the home page and the following pages without 502 ...
Abe's user avatar
  • 123
0 votes
0 answers
319 views

Cloudflare Argo Tunnel gives 502 bad gateway sometimes, but it’s fixed when I reload

I have a Cloudflare Argo tunnel with two subdomains. Each of them points to a port on localhost. About half of the time, when I visit those subdomains, they show 502 bad gateway, even though the ...
Globe's user avatar
  • 101
1 vote
0 answers
1k views

Upstream prematurely closed FastCGI stdout while reading response header from

I have a setup of nginx1.20.1 + php7.3.3 on Centos7. We run those VMs beneath google cloud load balancer. Sometimes, randomly there is 502 returned to the end client. I traced one of those error ...
Tim's user avatar
  • 31
0 votes
0 answers
1k views

connect() failed (111: Connection refused) while connecting to upstream Nginx

I'm working on the deployment of the app with the backend and frontend using Nginx as a proxy. However I'm facing the 502 Bad Gateway, the error says [error]: connect() failed (111: Connection ...
frankiie's user avatar
  • 101
4 votes
0 answers
4k 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 ...
CrashV24232's user avatar
0 votes
0 answers
5k 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....
Mnemosyne's user avatar
  • 131
2 votes
1 answer
2k views

Angular server side rendering keeps going down to 502 errors

So I have been running my front end on the server for a few weeks now(angular Server Side rendering). I keep running into this issue where the front end goes down to a 502 error. I have to restart the ...
Venomoustoad's user avatar
0 votes
1 answer
1k views

Cloudfront 502 error with ALB origin in different region

I have a CloudFront which has one of its origins as an application load balancer, this load balancer is available in a different region from the CloudFront which is only available in N.Virginia and is ...
Odasaku's user avatar
1 vote
0 answers
145 views

Apache HTTP proxy work for some destination ip and receive 502 Bad Request from other destinations

I've an HTTP proxy like this: Listen 8240 <VirtualHost *:8240> ProxyRequests On <Proxy "*"> SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 </Proxy> </...
alex's user avatar
  • 11
0 votes
1 answer
1k views

phpmyadmin error 502 Bad Gateway on nginex

i just installed phpmyadmin on my ubuntu 20.04 server but when I try to go to the site I have a 502 bad gateway error ... here is what I have in my LOG file : 2021/02/05 14:43:33 [crit] 662288#662288: ...
hari's user avatar
  • 1
1 vote
1 answer
1k views

Wordpress import process ends in 502 Bad Gateway error

I have a Wordpress website which have been working flawlessly for a while now in a LEMP with Ubuntu. However, today I had to import a previously exported XML from another Wordpress and in the middle ...
Alain's user avatar
  • 135
0 votes
0 answers
2k views

502 Bad Gateway when uploading files (NGINX and NodeJS)

I am developing an app where the user can upload files. While the backend call seems to work fine, the call when uploading files returns a 502 Bad Gateway message. The files actually get uploaded but ...
lnband's user avatar
  • 1
0 votes
0 answers
785 views

502 Error from nginx server after setting up http2 and ssl

I am getting a 502 error from my nginx server. I used certbot to configure the ssl and am trying to get http2 enabled and somehow i broke the server. when I run sudo nginx -t it reads: nginx: [warn] ...
mike's user avatar
  • 1
4 votes
2 answers
6k views

PHP/FPM/Nginx Issue: Runs fine for a hours, then maxes FPM children in a matter of seconds, resulting in 502 errors

We recently migrated a long running (without issue) Ubuntu 16.04 / nginx (1.10.3) / PHP 7.0 stack over to an Ubuntu 18.04 / nginx (1.14.0) / PHP 7.2 stack. The result has caused instability at the PHP-...
Slickrick12's user avatar
0 votes
1 answer
3k views

Laravel docker cron nginx 502 bad gateway issue

I am using my laravel app in a docker container. Everything worked fine until I added a cron to the dockerfile. I need to schedule a job so I need a cron. My compose file looks like this version: '3' ...
Jean's user avatar
  • 1
0 votes
1 answer
900 views

Nginx custom 502 page with nested proxies

I know how to create a custom 502 page for an upstream error and did it without problems many times, however in this particular case where one proxied response is passed to another proxy I can't find ...
user2586441's user avatar
1 vote
0 answers
46 views

My web application is running on One Server and two worker nodes

my nginx config file is server { listen ip-address:80 ; server_name subdomain.domain.com; server_name www.subdomain.domain.com; server_name ipv4.subdomain.domain.com; ...
MUmar's user avatar
  • 11
0 votes
1 answer
390 views

Lighttpd/Nginx Non-Functional

I'm using the Blackboard AMI from AWS and can't get the lighttpd to function on it. I continually get 502s. I've run service lighttpd status which gave me back: ● lighttpd.service - Lighttpd Daemon ...
user3783243's user avatar
3 votes
1 answer
9k views

How to configure nginx.conf and php-fpm using brew servinces in MAC-OS in order to run php?

I have following logs in php-fpm log . [19-Jan-2020 15:09:33] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root [19-Jan-2020 15:09:33] NOTICE: [pool www] 'user' directive ...
Shashank Gupta's user avatar
2 votes
3 answers
7k views

Proxy Error 502 "Error reading from remote server" Apache 2.4.18 Ubuntu with HTTPS into Docker container

I'm no expert and can't see what's the problem, but obviously this error is caused by a tiny detail it seems I can't debug. Any idea? What I have: I have multiple virtual hosts configured with Apache2 ...
Julien G's user avatar
0 votes
1 answer
4k views

nginx gunicorn django 502 worker timeout just on some pages

I configured a django app with gunicorn and nginx all was working perfectly until the installation of SSL certifiate on the server. firstly all pages were served perfectly but after some time some ...
chipop's user avatar
  • 1
3 votes
1 answer
245 views

Apache Local virtualhosts not working (502 error) [closed]

My local dev environment consists of a mac with OSX El Capitan 10.11.6. I have Apache 2.4.28 installed. Something seems to have gone wrong with my virtual host configuration as none of my local ...
Mr B's user avatar
  • 151
4 votes
1 answer
15k views

Difference between keepalive in apache2.conf and in ProxyPass

I am using Apache 2.2.22 What is the difference, if there is any, between the Keepalive directive in /etc/apache2/apache2.conf # # KeepAlive: Whether or not to allow persistent connections (more ...
nwtnsqrd's 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, ...
Thomas's user avatar
  • 223
3 votes
1 answer
1k views

After upgrade from ubuntu 14.04 to 16.04, nginx error 502: bad gateway until nginx is restarted

I have researched this problem, but in most cases the cause of the 502 error is an improperly configured nginx.conf or upstream service. I believe this is different.. As the title suggests, I ...
chrismeu's user avatar
  • 133
0 votes
0 answers
731 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 ...
gogog22510's user avatar
1 vote
1 answer
1k 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 ...
Lisa's user avatar
  • 21
0 votes
2 answers
8k views

NGINX and PHP-FPM 502 bad gateway

Ok so here is the situation, we currently have a server and we are now migrating to AWS. We have somehow identical configuration and we already tried to run apache benchmark so the PHP-FPM pool is ...
Rei's user avatar
  • 23
0 votes
2 answers
328 views

How to config Ngnix to achieve any possible website error for testing [closed]

I'm developing a website using Django framework and Nginx. Would like to create a false system error and observer how my system responds. This is a nice article however this only create false Error ...
Kim's user avatar
  • 3
0 votes
1 answer
146 views

Apache server throw me 502 error when I try to access site with Public IP

I have a little strange case. I configured two servers in AWS: Develop and QA, the two with Ubuntu 16.04, Apache 2 and PHP 7.0. I created a website en Develop, and configured its VirtualHost file. So,...
Eliacim DAVILA - CENSERE's user avatar
-1 votes
0 answers
1k 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 ...
cezar's user avatar
  • 1
3 votes
1 answer
12k 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 % ...
Tedi's user avatar
  • 161
2 votes
1 answer
21k views

Nginx reverse proxying to upstream getting 502 Bad Gateway?

My current Application deployment is receiving traffic on HTTP port and Nginx redirect it to HTTPS. This is working fine. Now we are planning to have another Nginx server act like a Load balancer to ...
PrashantB's user avatar
  • 133
2 votes
1 answer
20k views

502 "Error reading from remote server" when upstream service errors

I have apache set up as a reverse proxy. When the upstream service has an error (e.g. 500) the error is not returned to the client, but instead apache serves up a 502 "Error reading from remote server"...
DJL's user avatar
  • 155
1 vote
1 answer
15k 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....
Dimitar's user avatar
  • 123
2 votes
0 answers
5k views

Squid 502 errors

I am using Squid 3.3.13 with no cache enabled and all my clients in LAN are using it to access to HTTP and HTTPS websites. I am not using it as transparent proxy but clients have it configured in OS ...
Mat's user avatar
  • 1,873
0 votes
2 answers
2k views

Setup GitLab behind nginx with https and responding on different port

Dear serverfault community, I have recently installed bundled GitLab on my VPS running Ubuntu14.04. To get it running, I have used nginx, which is routing one particular subdomain to GitLab over http....
olhur's user avatar
  • 3
1 vote
0 answers
2k views

Listening to 127.0.0.1:9000 but var/run/php5-fpm.sock failed (2: No such file or directory)

I have a webserver configured to accept FastCGI requests at 127.0.0.1:9000 like below. /etc/php5/fpm/pool.d/www.conf: listen = 127.0.0.1:9000 /etc/nginx/sites-enabled/mysite: location ~ .php$ { ...
laketuna's user avatar
  • 125
1 vote
2 answers
416 views

nginx default error page stopped working for some reason

This used to work: server { server_name example.com; location / { proxy_pass http://localhost:8888; error_page 502 /502.html; } location = /502.html { root /var/www/example; } ...
davidhq's user avatar
  • 215
2 votes
0 answers
297 views

How to distinguish between internal error code 502 and upstream returned http_502 on a nginx proxy

We use nginx as a http proxy server.The following configuration: location / { proxy_pass_header Server; proxy_pass $scheme://$http_host$request_uri; } When urls proxied return error code 502 ...
user2978978's user avatar
5 votes
2 answers
18k views

How to add a fallback to my proxy in nginx?

I am trying to build a proxy for my node application through nginx thinking this will give me error pages if the node application failed or is not available on the port. The node app runs on 127.0.0....
Dominik's user avatar
  • 315
3 votes
0 answers
3k views

Docker: Nginx and hhvm socket configuration returns 502 Bad Gateway

I am trying to run nginx and hhvm with docker-compose and socket file configuration but it returns a 502 error. I can access to conf/hhvm/run/ from nginx and hhvm image. In the error.log nginx's file ...
Avel's user avatar
  • 31
1 vote
1 answer
4k views

502 Error When Trying to Post/Update in Wordpress After HHVM Installation

I'm hoping someone can lead me in the right direction of how to track down this problem. I recently had HHVM installed on my server with PHP as a fallback. Since then I've been having issues in WP ...
DRK's user avatar
  • 11
2 votes
1 answer
1k views

Apache RewriteRule 502 Error on dev server, works on live

I'm on Apache 2.2.15. My vhost.conf contains a RewriteRule to handle article URLs; # handling for neat article titles RewriteRule ^/news/[0-9]{4}/[A-za-z]{3}/([0-9a-zA-Z-]*)/([0-9]{4})([0-9]{6})/?$ "/...
sauntimo's user avatar
  • 153
4 votes
2 answers
385 views

Upgrade 2 Ghost blogs on same server, 1 quits immediately when run as a service

I have 2 Ghost blogs on a Digital Ocean server running: Ubuntu 14.04.3 LTS Nginx 1.4.6 (Ubuntu) Node v0.12.7 I used the instructions provided by Digital Ocean to set up the blogs, and they have ...
John Stephens's user avatar
0 votes
0 answers
2k views

Random 502 errors only with phpMyAdmin throgh nginx/php-fpm, with php segfault

I'm using nginx and php-fpm on many servers. Some have php 5.4 with APC and others 5.5 or 5.6 with opcache. PhpMyAdmin on servers on 5.4 work without any problems. PhpMyAdmin on servers on 5.5 or 5.6 ...
nyro's user avatar
  • 101