Installation problem with Nginx, Centos 7 and Zammad


  • Used Zammad version: 2.3
  • Used Zammad installation source: (source, package, …): Centos 7 Installation packafe and installation steps
  • Operating system: Centos 7 64-bit
  • Browser + version: Same issues on Mozilla, Chrome and Safari

Expected behavior:

Actual behavior:

  • nginx fails to start. The outpur of systemctl status nginx:
    ● 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 Mon 2018-03-05 18:45:13 SAST; 4min 3s ago
    Process: 23631 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
    Process: 23628 ExecStartPre=/usr/bin/rm -f /run/ (code=exited, status=0/SUCCESS)

Mar 05 18:45:13 systemd[1]: Starting The nginx HTTP and reverse proxy server…
Mar 05 18:45:13 nginx[23631]: nginx: [emerg] “upstream” directive is not allowed here in /etc/nginx/conf.d/zammad.conf:5
Mar 05 18:45:13 nginx[23631]: nginx: configuration file /etc/nginx/nginx.conf test failed
Mar 05 18:45:13 systemd[1]: nginx.service: control process exited, code=exited status=1
Mar 05 18:45:13 systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Mar 05 18:45:13 systemd[1]: Unit nginx.service entered failed state.
Mar 05 18:45:13 systemd[1]: nginx.service failed.

When running nginx -t, the output is as follows:
]nginx: [emerg] “upstream” directive is not allowed here in /etc/nginx/conf.d/zammad.conf:5
nginx: configuration file /etc/nginx/nginx.conf test failed

Steps to reproduce the behavior:

I am not able to find any firther documentation on why this error occurs, and I have rebuilt the server twice already. I did update the server name in the zammad.conf file as per the instructions.

Thanks in advance.

Can you provide you config please.
every Zammad on our hosted environment runs exact this RPM config, so my guess is the error is there.


Clean installation of Centos 7, exact installation of Zammad as per the installation instructions, only exception is I used PHP 7, not 5.6.

Is there specific lof files or config files you need. Sorry, I am not a specialist on the domain of Linux, just have a need for the Zammad solution.

Zammad does not rely on PHP.
It’s Ruby based.

Zammad creates an nginx confg, we just need this file or the content of the file. because it looks like the error comes from there.



I am running exactly same configuration as you, and Zammad installs and works well for me. In your case I guess NGINX misses ngx_http_upstream_module module which supports upstream declarations in config files. Maybe you can dig a bit in that direction.

I upgraded Nginx to version 1.4 and that problem appears to have gone away, however, still no luck in trying to use the application.

I now get NGINX Bad gateway.

Ruby -v = 2.4.1p111
Centos 7.4
Nginx 1.4.0

Nothing else, clean machine from scratch, will not work. Please assist!!

I deployed the docker image, and that works perfectly, but I HATE docker images.

did you install this module?

Please post your nginx.conf, especially for the zammad-vhost!
Otherwise it’s really hard to help you :confused:

@MrGeneration, thank you for the follow up. I used standard installation procedure for CentOS, installation went well without any error. Zammad works as expected if configured as clean installation (without OTRS migration).

nginx modules:

[root@z ~]# nginx -V
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/ --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'


[root@z ~]# cat /etc/nginx/nginx.conf
# For more information on configuration, see:
#   * Official English Documentation:
#   * Official Russian Documentation:

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        location / {

        error_page 404 /404.html;
            location = /40x.html {

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {

# Settings for a TLS enabled server.
#    server {
#        listen       443 ssl http2 default_server;
#        listen       [::]:443 ssl http2 default_server;
#        server_name  _;
#        root         /usr/share/nginx/html;
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers HIGH:!aNULL:!MD5;
#        ssl_prefer_server_ciphers on;
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#        location / {
#        }
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
#        error_page 500 502 503 504 /50x.html;
#            location = /50x.html {
#        }
#    }


Thank you. I am close to despair too :(:slightly_frowning_face:

You’re missing “ngx_http_upstream_module” for nginx!
You need to install this module to resolve errors.

Hi I’ve same problem, but how can I install the ngx_http_upstream_module?

It is possible that the default CentOS Repos do not include this module.
I’ve googled that up for you, you can follow the instructions of the following site:

Make sure to install the package from repo.
If this helps, please let me know - I’ll create a pull request for the installation documentation then. :slight_smile:

I tryed this also before with many errors on confilicts with preinstalled moduls with older version.

It was just a new v-server and now i installed ubuntu lts 16.04 with zammad this works…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.