Advertisement
Guest User

Untitled

a guest
Jun 5th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.21 KB | None | 0 0
  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.     include       mime.types;
  19.     default_type  application/octet-stream;
  20.  
  21.     # configure temporary paths
  22.     # nginx is started with param -p, setting nginx path to serverpack installdir
  23.     fastcgi_temp_path temp/fastcgi;
  24.     uwsgi_temp_path temp/uwsgi;
  25.     scgi_temp_path temp/scgi;
  26.     client_body_temp_path temp/client-body 1 2;
  27.     proxy_temp_path temp/proxy;
  28.  
  29.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  30.     #                  '$status $body_bytes_sent "$http_referer" '
  31.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  32.  
  33.     #access_log  logs/access.log  main;
  34.  
  35.     sendfile        on;
  36.     #tcp_nopush     on;
  37.  
  38.     #keepalive_timeout  0;
  39.     keepalive_timeout  65;
  40.  
  41.     #gzip  on;
  42.  
  43.     server {
  44.         listen       80;
  45.         server_name  localhost;
  46.    
  47.  
  48.     location / {
  49.         if (!-f $request_filename) {
  50.             rewrite ^(.*)$ /index.php?q=$1 last;
  51.             break;
  52.         }
  53.     }
  54.  
  55.  
  56.         #charset koi8-r;
  57.  
  58.         #access_log  logs/host.access.log  main;
  59.  
  60.         # the root path is /www
  61.         location / {
  62.             root   www;
  63.             index  index.php index.html index.htm;
  64.         }
  65.  
  66.         #error_page  404              /404.html;
  67.  
  68.         # redirect server error pages to the static page /50x.html
  69.         #
  70.         error_page   500 502 503 504  /50x.html;
  71.         location = /50x.html {
  72.             root   www;
  73.         }
  74.  
  75.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  76.         #
  77.         #location ~ \.php$ {
  78.         #    proxy_pass   http://127.0.0.1;
  79.         #}
  80.  
  81.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  82.         #
  83.         location ~ \.php$ {
  84.             root           www;
  85.             fastcgi_pass   127.0.0.1:9000;
  86.             fastcgi_index  index.php;
  87.             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
  88.             include        fastcgi_params;
  89.         }
  90.  
  91.         # deny access to .htaccess files, if Apache's document root
  92.         # concurs with nginx's one
  93.         #
  94.         #location ~ /\.ht {
  95.         #    deny  all;
  96.         #}
  97.     }
  98.  
  99.  
  100.     # another virtual host using mix of IP-, name-, and port-based configuration
  101.     #
  102.     #server {
  103.     #    listen       8000;
  104.     #    listen       somename:8080;
  105.     #    server_name  somename  alias  another.alias;
  106.  
  107.     #    location / {
  108.     #        root   html;
  109.     #        index  index.html index.htm;
  110.     #    }
  111.     #}
  112.  
  113.  
  114.     # HTTPS server
  115.     #
  116.     #server {
  117.     #    listen       443;
  118.     #    server_name  localhost;
  119.  
  120.     #    ssl                  on;
  121.     #    ssl_certificate      cert.pem;
  122.     #    ssl_certificate_key  cert.key;
  123.  
  124.     #    ssl_session_timeout  5m;
  125.  
  126.     #    ssl_protocols  SSLv2 SSLv3 TLSv1;
  127.     #    ssl_ciphers  HIGH:!aNULL:!MD5;
  128.     #    ssl_prefer_server_ciphers   on;
  129.  
  130.     #    location / {
  131.     #        root   html;
  132.     #        index  index.html index.htm;
  133.     #    }
  134.     #}
  135.  
  136.     include vhosts.conf;
  137.  
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement