Reputation: 19372
I am installing nginx
from source via the folllowing command:
./configure --sbin-path=/usr/bin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-debug --with-pcre \
--with-http_ssl_module \
&& make \
&& make install
The user
entry in /etc/nginx/nginx.conf
is commented out:
#user nobody;
When trying to start nginx
via command line just by typing nginx
I get the following error:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2017/11/03 14:57:08 [emerg] 17427#0: mkdir() "/usr/local/nginx/client_body_temp" failed (13: Permission denied)
I assume the second error relates to the process of creating the .pid
file under /usr/local/nginx
... (?)
There is no nginx
user in /etc/passwd
.
nginx
process is starting?/var/log
after installation via source code?Working on debian jessie
with nginx 1.13.6
Upvotes: 1
Views: 4887
Reputation: 125
I had the same error when I executed command nginx -t
. I solved using sudo nginx -t
Upvotes: 2