Skip to content

Commit

Permalink
Update the SilverStripe Nginx config (#791)
Browse files Browse the repository at this point in the history
* Update the SilverStripe Nginx config 

Updated the SilverStripe Nginx config to be inline with the new version 4 see https://docs.silverstripe.org/en/4/getting_started/installation/how_to/configure_nginx/ 

I can create a new serve-silverstripe3.sh file to keep support for legacy versions.

* Updated the sendfile to off
  • Loading branch information
TheBnl authored and svpernova09 committed Jan 11, 2018
1 parent 627f923 commit 70e975c
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions scripts/serve-silverstripe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,21 @@ block="server {
}
location / {
try_files \$uri /framework/main.php?url=\$uri&\$query_string;
try_files \$uri /index.php?url=\$uri&\$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /assets/error-404.html;
error_page 500 /assets/error-500.html;
access_log off;
error_log /var/log/nginx/$1-error.log error;
sendfile off;
location ^~ /assets/ {
location ~ /\. {
deny all;
}
sendfile off;
try_files \$uri /framework/main.php?url=\$uri&\$query_string;
try_files \$uri /index.php?url=\$uri&\$query_string;
}
location ~ /framework/.*(main|rpc|tiny_mce_gzip)\.php$ {
Expand All @@ -59,13 +56,6 @@ block="server {
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
$paramsTXT
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /(mysite|framework|cms)/.*\.(php|php3|php4|php5|phtml|inc)$ {
Expand Down

0 comments on commit 70e975c

Please sign in to comment.