我试图以当前用户(= ayush)运行Nginx.但是在设置user指令时出现以下错误:
Dec 11 22:26:13 manjaro Nginx[17194]: 2015/12/11 22:26:13 [emerg] 17194#0: getgrnam("ayush") Failed in /etc/Nginx/Nginx.conf:1
Dec 11 22:26:13 manjaro systemd[1]: Nginx.service: Control process exited,code=exited status=1
我的Nginx.conf:
user ayush;
worker_processes 1;
error_log /var/log/Nginx/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /code/server;
autoindex on;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/Nginx/html;
}
}
}
也:
ayush@manjaro ~> whoami
ayush