Posted by ariapn on July 7, 2013 at 1:41am
I just migrated our drupal site to nginx from apache.
I based my config on perusio's setup using drupal_boost.conf.
We have a main site and then a couple subsites using drupal multisite configuration. I think I configure it correctly. But please let me know if I did anything wrong or any improvement I can make. The complete conf file is here http://pastebin.com/y22PV59f
I'm not sure about this part:
location / {
# This is cool because no php is touched for static content
try_files $uri @cache;
}
location /sub1 {
rewrite ^/([^/]*)/(.*)(/?)$ /$1/index.php?q=$2&$args;
try_files $uri $uri/ @cache;
}
location /sub2 {
rewrite ^/([^/]*)/(.*)(/?)$ /$1/index.php?q=$2&$args;
try_files $uri $uri/ @cache;
}
location @drupal {
rewrite ^ /index.php;
}
Thanks.