Илья Шипицин
August 16, 2019 04:28AM
привет!

беру nginx-1.17.3
делаю вот такой конфиг

user nginx;
worker_processes auto;

working_directory /root;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}

http {
default_type application/octet-stream;

access_log off;

server {
listen 80;
server_name localhost;

location / {
return 200;
}

}

}

проверка проходит

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


при запуске есть только мастер, ни одного воркера

[root@working ~]# ps auxw | grep nginx
root 1225 0.0 0.0 46456 1100 ? Ss 08:23 0:00 nginx:
master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
root 1442 0.0 0.0 112704 972 pts/0 S+ 08:26 0:00 grep
--color=auto nginx
[root@working ~]#

в логе вот такая ошибка

2019/08/16 08:23:28 [alert] 1227#1227: chdir("/root") failed (13:
Permission denied)
2019/08/16 08:23:28 [alert] 1225#1225: worker process 1227 exited with
fatal code 2 and cannot be respawned
2019/08/16 08:23:28 [alert] 1226#1226: chdir("/root") failed (13:
Permission denied)
2019/08/16 08:23:28 [alert] 1225#1225: worker process 1226 exited with
fatal code 2 and cannot be respawned


можно как-то сделать, чтобы видеть эту ошибку на "nginx -t" ?

Илья Шипицин
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

"working_directory /root;" - ошибка не детектится через "nginx -t" ?

Илья Шипицин August 16, 2019 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready