Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 14th, 2012  |  syntax: None  |  size: 0.94 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. drupal.ex:
  2.  
  3. server {
  4.   server_name     localhost;
  5.   listen          localhost:80;
  6.  
  7.   access_log  /var/log/nginx/drupal.ex.access.log;
  8.   root   /var/www/nginx-drupal;
  9.  
  10.   include site-drupal;
  11.  
  12. }
  13.  
  14. ------------------------------------------------------
  15. site-drupal:
  16.  
  17. include site-php;
  18.  
  19. location / {
  20.   index index.php index.html;
  21. }
  22.  
  23. if (!-e $request_filename ) {
  24.   rewrite ^(.*)$ /index.php?q=$1;
  25. }
  26.  
  27. ------------------------------------------------------
  28. site-php:
  29.  
  30. location ~ /\.ht {     # закрываем доступ к файлам .htpasswd
  31.   deny        all;
  32. }
  33.  
  34. location ~ \.php$ {
  35.   include php-fpm-defaults;
  36. }
  37.  
  38.  
  39. ------------------------------------------------------
  40. php-fpm-defaults:
  41. include fastcgi_params;
  42. fastcgi_pass unix:/tmp/php.socket;
  43. fastcgi_index index.php;
  44. fastcgi_ignore_client_abort on;
  45. fastcgi_param SERVER_NAME $http_host;
  46. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;