Skip to content

nginx: [emerg] "user" directive is not allowed here in /etc/nginx/conf.d/nginx.conf:1 #2573

Answered by IavTavares
IavTavares asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is that there's already another file /etc/nginx/nginx.conf, which is including these variables, and the configuration in the file /etc/nginx/conf.d/nginx.conf.
I need to remove

user  nginx;
worker_processes  auto; 
# auto When one is in doubt, setting it to the number of available
# CPU cores would be a good start (the value “auto” will try to autodetect it).
 
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IavTavares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant