3
我使用的是nginx 1.4.1。在複製unicorn's example of nginx.conf
後,我發現這些設置必須移至不同的指令。我仍然無法設置在nginx.conf
文件中的以下設置:worker_processes
,user
,pid
和events
塊。當我現在將它們放置時,日誌顯示directive is not allowed here
。我應該修復什麼?nginx指令在這裏是不允許在麒麟的例子中nginx.conf
worker_processes 1;
user deployer sudo; # for systems with a "nogroup"
pid /run/nginx.pid;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
}
upstream qwuen {
...
}
server {
...
}
更新1
我知道這個post,但它的怪異,無論我做的是不工作。我在nginx中找不到任何文檔。
你的'http {'塊與上面的代碼相比在哪裏? – CDub
@CDub,我刪除它。 – Victor