-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathdrupal-7-8.conf
110 lines (88 loc) · 2.34 KB
/
drupal-7-8.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
root /home/u1/domains/example.com;
location = /rss.xml {
rewrite ^ /index.php?q=rss.xml;
}
location = /sitemap.xml {
try_files $uri /index.php?q=sitemap.xml;
}
location / {
location ^~ /system/files/ {
fastcgi_pass unix:/var/run/php5-example.com.sock;
log_not_found off;
}
location ^~ /sites/default/files/private/ {
internal;
}
location ^~ /system/files_force/ {
fastcgi_pass unix:/var/run/php5-example.com.sock;
log_not_found off;
}
location ~* /imagecache/ {
access_log off;
expires 30d;
try_files $uri @drupal;
}
location ~* /files/styles/ {
access_log off;
expires 30d;
try_files $uri @drupal;
}
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|svg)$ {
access_log off;
expires 30d;
tcp_nodelay off;
}
location ~* ^.+\.(?:pdf|pptx?)$ {
expires 30d;
tcp_nodelay off;
}
location ^~ /help/ {
location ~* ^/help/[^/]*/README\.txt$ {
fastcgi_pass unix:/var/run/php5-example.com.sock;
}
}
location ~* ^(?:.+\.(?:htaccess|make|engine|inc|info|install|module|profile|po|pot|sh|.*sql|test|theme|tpl(?:\.php)?|xtmpl)|code-style\.pl|/Entries.*|/Repository|/Root|/Tag|/Template)$ {
return 404;
}
try_files $uri $uri/ @cache;
}
location @cache {
if ($query_string ~ ".+") {
return 405;
}
if ($http_cookie ~ "DRUPAL_UID" ) {
return 405;
}
if ($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
error_page 405 = @drupal;
expires 12h;
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
try_files /cache/normal/$host/${uri}_.html /cache/perm/$host/${uri}_.css /cache/perm/$host/${uri}_.js /cache/$host/0$uri.html /cache/$host/0${uri}/index.html @drupal;
}
location @drupal {
rewrite ^ /index.php;
}
location @drupal-no-args {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-example.com.sock;
}
location ~ /\. {
deny all;
}
location @empty {
expires 30d;
}
location = /boost_stats.php {
fastcgi_pass unix:/var/run/php5-example.com.sock;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-example.com.sock;
}