ini Nginx 1.10 Drupal的配置文件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini Nginx 1.10 Drupal的配置文件相关的知识,希望对你有一定的参考价值。
server {
listen 80;
server_name default;
access_log /var/log/nginx/localhost.access.log;
error_log /var/log/nginx/error.log;
root /usr/share/nginx/html;
index index.php;
## serve imagecache files directly or redirect to drupal if they do not exist.
location ~* files/styles {
access_log off;
expires 30d;
try_files $uri @drupal;
}
## serve imagecache files directly or redirect to drupal if they do not exist.
location ~* ^.+.(xsl|xml)$ {
access_log off;
expires 1d;
try_files $uri @drupal;
}
## Default location
location / {
try_files $uri $uri/ @drupal;
index index.php;
}
location @drupal {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
}
## Parse all .php file in the /var/www directory
location ~ .php$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
}
以上是关于ini Nginx 1.10 Drupal的配置文件的主要内容,如果未能解决你的问题,请参考以下文章
nginx 1.10 代理https 钉一钉
nginx 1.10 代理https 钉一钉
aliyun 主机Nginx 上配置Drupal 伪静态
Nginx 1.10 上的 SPDY 代替 HTTP2
ini [nginx conf] nginx简易转发配置#nginx
ini Nginx最佳配置(基本配置)