nginx não iniciará: getpwnam (“nginx”) falhou em /etc/nginx/nginx.conf:5

1

Estou executando um servidor nginx chrooted no CentOS 7. Quando tento iniciar o nginx, recebo este erro: getpwnam("nginx") failed in /etc/nginx/nginx.conf:5 . Eu já copiei as bibliotecas, os diretórios necessários ( /etc, /var, /proc, /usr, /lib, /dev ), etc. Estou iniciando o serviço como root.

Meu nginx.conf:

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

[root@centos user]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Usuário / grupo está presente:

[root@centos user]# cat /var/www/chroot/etc/passwd | grep nginx
nginx:x:993:988:Nginx web server:/var/lib/nginx:/bin/bash

[root@centos user]# cat /var/www/chroot/etc/group | grep nginx
nginx:x:988:

Além disso, meu arquivo nginx.service personalizado:

[Unit]
Description=A high performance web server and a reverse proxy server in a 
chroot jail
After=syslog.target network.target

[Service]
Type=forking
RootDirectory=/var/www/chroot
PIDFile=/var/www/chroot/run/nginx.pid
ExecStartPre=/usr/sbin/chroot /var/www/chroot /usr/sbin/nginx -t -q -g 'pid 
/run/nginx.pid; daemon on; master_process on;'
ExecStart=/usr/sbin/chroot /var/www/chroot /usr/sbin/nginx -g 'pid 
/run/nginx.pid; daemon on; master_process on;'
ExecReload=/usr/sbin/chroot /var/www/chroot /usr/sbin/nginx -g 'pid 
/run/nginx.pid; daemon on; master_process on;' -s reload
ExecStop=/usr/sbin/chroot /var/www/chroot /usr/sbin/nginx -g 'pid 
/run/nginx.pid;' -s quit
RootDirectoryStartOnly=yes

[Install]
WantedBy=multi-user.target

versão nginx:

[root@centos user]# yum info nginx
Installed Packages
Name        : nginx
Arch        : x86_64
Epoch       : 1
Version     : 1.10.2
Release     : 1.el7 
    
por N.M.D 16.08.2017 / 23:55

0 respostas