
Untitled
By: a guest on
May 14th, 2012 | syntax:
None | size: 0.94 KB | hits: 19 | expires: Never
drupal.ex:
server {
server_name localhost;
listen localhost:80;
access_log /var/log/nginx/drupal.ex.access.log;
root /var/www/nginx-drupal;
include site-drupal;
}
------------------------------------------------------
site-drupal:
include site-php;
location / {
index index.php index.html;
}
if (!-e $request_filename ) {
rewrite ^(.*)$ /index.php?q=$1;
}
------------------------------------------------------
site-php:
location ~ /\.ht { # закрываем доступ к файлам .htpasswd
deny all;
}
location ~ \.php$ {
include php-fpm-defaults;
}
------------------------------------------------------
php-fpm-defaults:
include fastcgi_params;
fastcgi_pass unix:/tmp/php.socket;
fastcgi_index index.php;
fastcgi_ignore_client_abort on;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;