Skip to content

Instantly share code, notes, and snippets.

@schliflo
Created March 6, 2019 17:23
Show Gist options
  • Save schliflo/b5081cb030f5b84bad289d760d298b6f to your computer and use it in GitHub Desktop.
Save schliflo/b5081cb030f5b84bad289d760d298b6f to your computer and use it in GitHub Desktop.
wordpress bedrock ispconfig nginx config
##subroot bedrock/web ##
client_max_body_size 256M;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
location ~* \.(jpg|jpeg|png|svg|gif|ico|css|js)$ {
expires 365d;
}
location @php {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
{FASTCGIPASS}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment