1

Topic: Nginx not starting after upgrading from Ubuntu 16.06 LTS to 18.04 LTS

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1 Mysql Edition
- Deployed with iRedMail Easy or the downloadable installer? Deployed
- Linux/BSD distribution name and version:  Ubuntu 18.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Dear Forum members,

I'm struggling with getting Nginx work again after upgrading the Ubuntu to 18.04 LTS. Nginx is not starting due to:

Mar 24 19:24:41 mail.iemg.hu nginx[82118]: nginx: [emerg] no port in upstream "php_workers" in /etc/nginx/templates/fastcgi_php.tmpl:13
Mar 24 19:24:41 mail.iemg.hu nginx[82118]: nginx: configuration file /etc/nginx/nginx.conf test failed


Previously php fpm was used with unix socket, but I also tried to switch to tcp connection

PHP FPM 7.2 works:
root@mail:~# telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

nginx conf seems good for me:
root@mail:~# cat /etc/nginx/conf-enabled/php-fpm.conf
upstream php_workers {
    server 127.0.0.1:9999;
}

root@mail:~# cat /etc/nginx/templates/fastcgi_php.tmpl
#
# Template used to handle PHP fastcgi applications
#
# You still need to define `SCRIPT_FILENAME` for your PHP application, and
# probably `fastcgi_index` if your application use different index file.
#
include fastcgi_params;

# Directory index file
fastcgi_index index.php;

# Handle PHP files with upstream handler
fastcgi_pass php_workers;
#fastcgi_pass server 127.0.0.1:9000;

# Fix the HTTPROXY issue.
# Reference: https://httpoxy.org/
fastcgi_param HTTP_PROXY '';



Please advise. I'm really not an expert with Nginx, only with apache (the two other host were upgraded without issues)

Thanks,
KovBal