나는'm 새로운 NGINX 나는'm 하려고 설정한 최소한의 작업을 것입니다. 그래서 실행하려고 aiohttp mini-응용 프로그램 nginx 및 감독관(의이예). 그러나 나는 할 수 있't 구성 Nginx 오른쪽에 오류가:
nginx: [emerg] "http" directive is not allowed here in /etc/nginx/sites-enabled/default:1
여기에는 전체 기본입니다.conf file:
http {
upstream aiohttp {
# Unix domain servers
server unix:/tmp/example_1.sock fail_timeout=0;
server unix:/tmp/example_2.sock fail_timeout=0;
server unix:/tmp/example_3.sock fail_timeout=0;
server unix:/tmp/example_4.sock fail_timeout=0;
}
server {
listen 80;
client_max_body_size 4G;
server example.com;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://aiohttp;
}
}
}
그것은 올바른 보인다.서버의 지침에서
http`로 해야 합니다. 고 http 은 부모 directive. 내가 무엇'm doing wrong?