Advertisement
Guest User

Untitled

a guest
Jan 14th, 2011
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.66 KB | None | 0 0
  1. #user  nobody;
  2. worker_processes  2;
  3.  
  4. #error_log  logs/error.log;
  5. #error_log  logs/error.log  notice;
  6. #error_log  logs/error.log  info;
  7.  
  8. #pid        logs/nginx.pid;
  9.  
  10.  
  11. events {
  12.     worker_connections  1024;
  13. }
  14.  
  15.  
  16. http {
  17.     include       mime.types;
  18.     default_type  application/octet-stream;
  19.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  20.     #                  '$status $body_bytes_sent "$http_referer" '
  21.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  22.  
  23.     #access_log  logs/access.log  main;
  24.  
  25.     sendfile        on;
  26.     tcp_nopush     on;
  27.  
  28.     #keepalive_timeout  0;
  29.     keepalive_timeout  65;
  30.  
  31.     #gzip  on;
  32.  
  33.     server {
  34.         #gzip     on;
  35.         listen       80;
  36.         server_name  localhost;
  37.      
  38.      
  39.         location ~ ^/cgi-bin/.*\.(cgi|pl|py|rb) {
  40.         gzip off;
  41.         fastcgi_pass  127.0.0.1:49232;
  42.         fastcgi_index cgi-bin.php;
  43.         fastcgi_param SCRIPT_FILENAME    /usr/local/nginx/conf/cgi-bin.php;
  44.         fastcgi_param SCRIPT_NAME        /cgi-bin/cgi-bin.php;
  45.         fastcgi_param X_SCRIPT_FILENAME  /var/www$fastcgi_script_name;
  46.         fastcgi_param X_SCRIPT_NAME      $fastcgi_script_name;
  47.         fastcgi_param QUERY_STRING       $query_string;
  48.     fastcgi_param REQUEST_METHOD     $request_method;
  49.         fastcgi_param CONTENT_TYPE       $content_type;
  50.         fastcgi_param CONTENT_LENGTH     $content_length;
  51.         fastcgi_param GATEWAY_INTERFACE  CGI/1.1;
  52.         fastcgi_param SERVER_SOFTWARE    nginx;
  53.         fastcgi_param REQUEST_URI        $request_uri;
  54.         fastcgi_param DOCUMENT_URI       $document_uri;
  55.         fastcgi_param DOCUMENT_ROOT      $document_root;
  56.         fastcgi_param SERVER_PROTOCOL    $server_protocol;
  57.         fastcgi_param REMOTE_ADDR        $remote_addr;
  58.         fastcgi_param REMOTE_PORT        $remote_port;
  59.         fastcgi_param SERVER_ADDR        $server_addr;
  60.         fastcgi_param SERVER_PORT        $server_port;
  61.         fastcgi_param SERVER_NAME        $server_name;
  62.         fastcgi_param REMOTE_USER        $remote_user;
  63.         }
  64.  
  65.         location ~ ^/awstats/ {
  66.         root   /var/www/awstats;
  67.     index  index.html;
  68.         access_log off;
  69.         error_log off;
  70.         charset utf-8;
  71.         }
  72.  
  73.         location ~ ^/icon/ {
  74.         root   /root/awstats/wwwroot;
  75.         index  index.html;
  76.         access_log off;
  77.         error_log off;
  78.         charset utf-8;
  79.         }
  80.  
  81.         location / {
  82.             root   /var/www;
  83.             index  index.html index.htm index.php;
  84.         }
  85.     error_page   500 502 503 504  /50x.html;
  86.         location = /50x.html {
  87.             root   html;
  88.         }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement