TeamBlast

Untitled

Jun 25th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.94 KB | None | 0 0
  1. # nginx.conf for running the Bricks PHP web framework
  2. # https://github.com/Circlepuller/Bricks
  3. #user                 www www; # Uncomment if using a UNIX-like OS
  4. worker_processes     5;
  5. error_log            logs/error.log;
  6. pid                  logs/nginx.pid;
  7. worker_rlimit_nofile 8192;
  8.  
  9. events {
  10.   worker_connections 4096;
  11. }
  12.  
  13. http {
  14.   include      mime.types;
  15.   include      fastcgi.conf;
  16.   index        index.html index.htm index.php;
  17.   default_type application/octet-stream;
  18.   log_format   main '$remote_addr - $remote_user [$time_local] "$request" '
  19.                     '$status $body_bytes_sent "$http_referer" '
  20.                     '"$http_user_agent" "$http_x_forwarded_for"';
  21.  
  22.   access_log                    logs/access.log main;
  23.   sendfile                      on;
  24.   tcp_nopush                    on;
  25.   server_names_hash_bucket_size 128;
  26.  
  27.   server {
  28.     listen      80 default;
  29.     server_name _;
  30.     root        html;
  31.  
  32.     # Hax in the simplest form
  33.     location ~ ^/(authors|robots)\.txt$ {}
  34.     location ~ ^/favicon\.ico$ {}
  35.     location /assets {}
  36.  
  37.     location / {
  38.       index     index.php;
  39.       try_files $uri @rewrite;
  40.     }
  41.  
  42.     location @rewrite {
  43.       rewrite ^(.*)$ /index.php$1 last;
  44.     }
  45.  
  46.     location ~ ^/(index)\.php(/|$) {
  47.       fastcgi_pass            127.0.0.1:9000;
  48.       fastcgi_index           index.php;
  49.       fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
  50.       include                 fastcgi_params;
  51.       fastcgi_param           SCRIPT_FILENAME $document_root$fastcgi_script_name;
  52.       fastcgi_param           PATH_INFO       $fastcgi_path_info;
  53.       fastcgi_param           PATH_TRANSLATED $document_root$fastcgi_path_info;
  54.       fastcgi_param           QUERY_STRING    $query_string;
  55.       fastcgi_param           REQUEST_METHOD  $request_method;
  56.       fastcgi_param           CONTENT_TYPE    $content_type;
  57.       fastcgi_param           CONTENT_LENGTH  $content_length;
  58.     }
  59.   }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment