"worker_processes" directive is not allowed nginx "worker_processes" directive is not allowed nginx nginx nginx

"worker_processes" directive is not allowed nginx


Put that directive at the top of the /etc/nginx/nginx.conf instead of /etc/nginx/conf.d/default.conf.

The worker_processes directive is valid only at the top level of the configuration.

Now it comes by default in /etc/nginx/nginx.conf.


A simple solution that worked for me.

Just add server section in the ngnix.conf and remove all the content like

server {    listen 80;    location / {    root   /usr/share/nginx/html;    index  index.html index.htm;    }    location /akka {    proxy_pass http://hello-akka;    }    location /assets {    root /var/www;    }   }