Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. nginx: [emerg] unknown directive "user" in /etc/nginx/sites-enabled/
  2. tornado:1
  3.  
  4. nginx: [emerg] unknown directive "worker_processes" in /etc/nginx/
  5. sites-enabled/tornado:1
  6.  
  7. user www-data www-data;
  8. worker_processes 1;
  9.  
  10. error_log /var/log/nginx/error.log;
  11. pid /var/run/nginx.pid;
  12.  
  13. events {
  14. worker_connections 1024;
  15. use epoll;
  16.  
  17. }
  18.  
  19. http {
  20. # Enumerate all the Tornado servers here
  21. upstream frontends {
  22. server 127.0.0.1:8081;
  23. server 127.0.0.1:8082;
  24. server 127.0.0.1:8083;
  25. server 127.0.0.1:8084;
  26. }
  27.  
  28. include /etc/nginx/mime.types;
  29. default_type application/octet-stream;
  30.  
  31. access_log /var/log/nginx/access.log;
  32.  
  33. keepalive_timeout 65;
  34. proxy_read_timeout 200;
  35. sendfile on;
  36. tcp_nopush on;
  37. tcp_nodelay on;
  38. gzip on;
  39. gzip_min_length 1000;
  40. gzip_proxied any;
  41. gzip_types text/plain text/html text/css text/xml
  42. application/x-javascript application/xml
  43. application/atom+xml text/javascript;
  44.  
  45. # Only retry if there was a communication error, not a timeout
  46. # on the Tornado server (to avoid propagating "queries of death"
  47. # to all frontends)
  48. proxy_next_upstream error;
  49.  
  50. server {
  51. listen 8080;
  52.  
  53. # Allow file uploads
  54. client_max_body_size 50M;
  55.  
  56. location ^~ /static/ {
  57. root /var/www;
  58. if ($query_string) {
  59. expires max;
  60. }
  61. }
  62. location = /favicon.ico {
  63. rewrite (.*) /static/favicon.ico;
  64. }
  65. location = /robots.txt {
  66. rewrite (.*) /static/robots.txt;
  67. }
  68.  
  69. location / {
  70. proxy_pass_header Server;
  71. proxy_set_header Host $http_host;
  72. proxy_redirect false;
  73. proxy_set_header X-Real-IP $remote_addr;
  74. proxy_set_header X-Scheme $scheme;
  75. proxy_pass http://frontends;
  76. }
  77. }
  78.  
  79. }
  80.  
  81. evan@host:~/$ cat /etc/nginx/nginx.conf | grep include
  82. include /etc/nginx/mime.types;
  83. include /etc/nginx/conf.d/.conf;
  84. include /etc/nginx/sites-enabled/;
  85.  
  86. user www-data;
  87. worker_processes 4;
  88. worker_connections 1024;
  89.  
  90. grep processor /proc/cpuinfo | wc -l
  91.  
  92. ulimit -n
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement