# Nginx 502 bad gateway after Mautic fresh installation

**URL:** https://forum.mautic.org/t/nginx-502-bad-gateway-after-mautic-fresh-installation/19486
**Category:** Mautic 3 - Install/Upgrade Support
**Created:** [May 17, 2021, 7:30am UTC](https://forum.mautic.org/t/nginx-502-bad-gateway-after-mautic-fresh-installation/19486 "2021-05-17T07:30:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![geoligin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/geoligin/32/749_2.png) [@geoligin](https://forum.mautic.org/u/geoligin)
#### Post date: [May 17, 2021, 7:30am UTC](https://forum.mautic.org/t/nginx-502-bad-gateway-after-mautic-fresh-installation/19486/1 "2021-05-17T07:30:09Z")

</div>

**Your software** 91\_mautic-333  
_My PHP version is_ : php-common-5.4.16-48.el7.x86\_64  
php-gd-5.4.16-48.el7.x86\_64  
php-mysql-5.4.16-48.el7.x86\_64  
php-cli-5.4.16-48.el7.x86\_64  
php-process-5.4.16-48.el7.x86\_64  
php-pdo-5.4.16-48.el7.x86\_64  
php-mbstring-5.4.16-48.el7.x86\_64  
php-fpm-5.4.16-48.el7.x86\_64  
php-intl-5.4.16-48.el7.x86\_64  
php-xml-5.4.16-48.el7.x86\_64  
_My MySQL/MariaDB version is_ (delete as applicable): MySQL/MariaDB version  
mysql-community-libs-compat-5.7.34-1.el7.x86\_64  
mysql57-community-release-el7-9.noarch  
mysql-community-libs-5.7.34-1.el7.x86\_64  
php-mysql-5.4.16-48.el7.x86\_64  
mysql-community-common-5.7.34-1.el7.x86\_64  
mysql-community-server-5.7.34-1.el7.x86\_64  
mysql-community-client-5.7.34-1.el7.x86\_64

**Updating/Installing Errors**  
_I am_ (delete as applicable): Installing / Updating  
_Upgrading/installing via_ (delete as applicable) : Web / Command Line

_These errors are showing in the installer_ :

_These errors are showing in the Mautic log_ :

_These errors are showing in the upgrade\_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path)_ :

**Your problem**  
_My problem is_ : I have unzipped mautic in /var/ww/html/mautic folder and configured nginx as well and php-fpm also running

[root@nqdrvmpstg02mail ~]# ps aux | grep php  
root 30587 0.0 0.1 345100 9364 ? Ss May16 0:04 php-fpm: master process (/etc/php-fpm.conf)  
apache 30589 0.0 0.1 357960 5992 ? S May16 0:00 php-fpm: pool www  
apache 30590 0.0 0.1 357960 5992 ? S May16 0:00 php-fpm: pool www  
apache 30591 0.0 0.1 357960 5992 ? S May16 0:00 php-fpm: pool www  
apache 30592 0.0 0.1 357960 5992 ? S May16 0:00 php-fpm: pool www  
apache 30593 0.0 0.1 357960 5992 ? S May16 0:00 php-fpm: pool www  
root 172955 0.0 0.0 112816 972 pts/0 S+ 11:28 0:00 grep --color=auto php  
[root@nqdrvmpstg02mail ~]#

But i am getting 502 bad gateway in nginx while accessing the url  
[root@nqdrvmpstg02mail nginx]# cat error.log  
2021/05/17 11:25:39 [error] 30754#30754: \*56 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.164.17, server: 10.12.205.27, request: “GET / HTTP/1.1”, upstream: “fastcgi://0.0.0.0:9000”, host: “10.12.205.27”  
2021/05/17 11:25:39 [error] 30754#30754: \*56 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.164.17, server: 10.12.205.27, request: “GET /favicon.ico HTTP/1.1”, upstream: “fastcgi://0.0.0.0:9000”, host: “10.12.205.27”, referrer: “[http://10.12.205.27/](http://10.12.205.27/)”

_Steps I have tried to fix the problem_ :
