Commit 631bfc7c authored by omega8cc's avatar omega8cc

Drupal 8 compatibility in Nginx.

parent 24545454
......@@ -64,6 +64,18 @@ location = /cron.php {
fastcgi_pass 127.0.0.1:9000;
}
###
### Allow local access to support wget method in Aegir settings
### for running sites cron in Drupal 8.
###
location = /core/cron.php {
access_log off;
allow 127.0.0.1;
deny all;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
}
###
### Send search to php-fpm early so searching for node.js will work.
### Deny bots on search uri without 403 response.
......@@ -217,6 +229,14 @@ location ~* ^/sites/.*/files/backup_migrate/ {
deny all;
}
###
### Deny direct access to config files in Drupal 8.
###
location ~* ^/sites/.*/files/config_.* {
access_log off;
deny all;
}
###
### Private downloads are always sent to the drupal backend.
### Note: this location doesn't work with X-Accel-Redirect.
......@@ -565,7 +585,7 @@ location = /index.php {
###
### Send other known php requests/files to php-fpm without any caching.
###
location ~* ^/(?:boost_stats|update|authorize|rtoc|xmlrpc)\.php$ {
location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc)\.php$ {
access_log off;
try_files $uri =404; ### check for existence of php file first
fastcgi_pass 127.0.0.1:9000;
......
......@@ -64,6 +64,18 @@ location = /cron.php {
fastcgi_pass 127.0.0.1:9000;
}
###
### Allow local access to support wget method in Aegir settings
### for running sites cron in Drupal 8.
###
location = /core/cron.php {
access_log off;
allow 127.0.0.1;
deny all;
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
}
###
### Send search to php-fpm early so searching for node.js will work.
### Deny bots on search uri without 403 response.
......@@ -203,6 +215,14 @@ location ~* ^/sites/.*/files/backup_migrate/ {
deny all;
}
###
### Deny direct access to config files in Drupal 8.
###
location ~* ^/sites/.*/files/config_.* {
access_log off;
deny all;
}
###
### Private downloads are always sent to the drupal backend.
### Note: this location doesn't work with X-Accel-Redirect.
......@@ -550,7 +570,7 @@ location = /index.php {
###
### Send other known php requests/files to php-fpm without any caching.
###
location ~* ^/(?:boost_stats|update|authorize|rtoc|xmlrpc)\.php$ {
location ~* ^/(?:core/)?(?:boost_stats|update|authorize|rtoc|xmlrpc)\.php$ {
access_log off;
try_files $uri =404; ### check for existence of php file first
fastcgi_pass 127.0.0.1:9000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment