Advertisement
Guest User

nginx conf

a guest
Jul 28th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #user  nobody;
  3. worker_processes  1;
  4.  
  5. #error_log  logs/error.log;
  6. #error_log  logs/error.log  notice;
  7. #error_log  logs/error.log  info;
  8.  
  9. #pid        logs/nginx.pid;
  10.  
  11.  
  12. events {
  13.     worker_connections  1024;
  14. }
  15.  
  16.  
  17. http {
  18.     passenger_root /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.14;
  19.     passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby;
  20.  
  21.     include       mime.types;
  22.     default_type  application/octet-stream;
  23.  
  24.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  25.     #                  '$status $body_bytes_sent "$http_referer" '
  26.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  27.  
  28.     #access_log  logs/access.log  main;
  29.  
  30.     sendfile        on;
  31.     #tcp_nopush     on;
  32.  
  33.     #keepalive_timeout  0;
  34.     keepalive_timeout  65;
  35.  
  36.     #gzip  on;
  37.  
  38.     server {
  39.         listen       80;
  40.         server_name  localhost;
  41.  
  42.         #charset koi8-r;
  43.  
  44.         #access_log  logs/host.access.log  main;
  45.  
  46.         location / {
  47.             root   /web/mkf/public;
  48.             index  index.html index.htm;
  49.         }
  50.         passenger_enabled on;
  51.     rails_env development;
  52.  
  53.         #error_page  404              /404.html;
  54.  
  55.         # redirect server error pages to the static page /50x.html
  56.         #
  57.         error_page   500 502 503 504  /50x.html;
  58.         location = /50x.html {
  59.             root   html;
  60.         }
  61.  
  62.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  63.         #
  64.         #location ~ \.php$ {
  65.         #    proxy_pass   http://127.0.0.1;
  66.         #}
  67.  
  68.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  69.         #
  70.         #location ~ \.php$ {
  71.         #    root           html;
  72.         #    fastcgi_pass   127.0.0.1:9000;
  73.         #    fastcgi_index  index.php;
  74.         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  75.         #    include        fastcgi_params;
  76.         #}
  77.  
  78.         # deny access to .htaccess files, if Apache's document root
  79.        # concurs with nginx's one
  80.         #
  81.         #location ~ /\.ht {
  82.         #    deny  all;
  83.         #}
  84.     }
  85.  
  86.  
  87.     # another virtual host using mix of IP-, name-, and port-based configuration
  88.     #
  89.     #server {
  90.     #    listen       8000;
  91.     #    listen       somename:8080;
  92.     #    server_name  somename  alias  another.alias;
  93.  
  94.     #    location / {
  95.     #        root   html;
  96.     #        index  index.html index.htm;
  97.     #    }
  98.     #}
  99.  
  100.  
  101.     # HTTPS server
  102.     #
  103.     #server {
  104.     #    listen       443;
  105.     #    server_name  localhost;
  106.  
  107.     #    ssl                  on;
  108.     #    ssl_certificate      cert.pem;
  109.     #    ssl_certificate_key  cert.key;
  110.  
  111.     #    ssl_session_timeout  5m;
  112.  
  113.     #    ssl_protocols  SSLv2 SSLv3 TLSv1;
  114.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  115.     #    ssl_prefer_server_ciphers   on;
  116.  
  117.     #    location / {
  118.     #        root   html;
  119.     #        index  index.html index.htm;
  120.     #    }
  121.     #}
  122.  
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement