title: Failed to start The nginx HTTP and reverse proxy server issue
body: <p>First time I'm stalling nginx server in my fedora 24. I'm using apache server for development. For onlyoffice integration I have to install nginx server. I installed nginx server by using this command <code>dnf install nginx</code> </p>
  
  <p>Before starting nginx server I stopped apache and disabled it also like below.</p>
  
  <pre><code>systemctl stop httpd
  systemctl disable httpd
  </code></pre>
  
  <p>If I start the nginx server <code>sudo service nginx start</code> I'm getting below error.</p>
  
  <pre><code>Redirecting to /bin/systemctl start  nginx.service
  Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
  </code></pre>
  
  <p>So I ran the <code>systemctl status nginx.service</code> command to know issue detail, I got below output in my terminal. </p>
  
  <pre><code>[root@localhost ~]# systemctl -l status nginx.service
  ● nginx.service - The nginx HTTP and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2016-10-20 01:45:57 IST; 10s ago
    Process: 10719 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
    Process: 10709 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
  
  Oct 20 01:45:57 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse proxy server...
  Oct 20 01:45:57 localhost.localdomain nginx[10719]: nginx: [emerg] no port in upstream "php-fpm" in /etc/nginx/default.d/phpMyAdmin.conf:17
  Oct 20 01:45:57 localhost.localdomain nginx[10719]: nginx: configuration file /etc/nginx/nginx.conf test failed
  Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Control process exited, code=exited status=1
  Oct 20 01:45:57 localhost.localdomain systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
  Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Unit entered failed state.
  Oct 20 01:45:57 localhost.localdomain systemd[1]: nginx.service: Failed with result 'exit-code'.
  </code></pre>
  
  <p>I tried several ways to fix by changing the <code>listen 80</code> to <code>listen 801</code> in /etc/nginx/nginx.conf but no issue. I followed the below urls also but I can't fix the issue. </p>
  
  <p><a href="https://stackoverflow.com/questions/35868976/nginx-not-started-and-cant-start">nginx not started and can&#39;t start</a></p>
  
  <p><a href="https://serverfault.com/questions/717752/cant-start-nginx-code-exited-status-1-failure">https://serverfault.com/questions/717752/cant-start-nginx-code-exited-status-1-failure</a></p>
  
  <p><strong>/etc/nginx/default.d/phpMyAdmin.conf</strong></p>
  
  <pre><code># phpMyAdmin
  
  location = /phpMyAdmin {
      alias /usr/share/phpMyAdmin/;
  }
  
  location /phpMyAdmin/ {
       root /usr/share;
       index index.php index.html;
  
       location ~ ^/phpMyAdmin/(.+\.php)$
       {
           try_files $uri =404;
           fastcgi_intercept_errors on;
           include        fastcgi_params;
           fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
           fastcgi_pass   php-fpm;  //this is line number 17
       }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>