Skip to content

Instantly share code, notes, and snippets.

@kevinruscoe
Last active May 8, 2016 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinruscoe/acaeb5691a03e43913469324bef4950a to your computer and use it in GitHub Desktop.
Save kevinruscoe/acaeb5691a03e43913469324bef4950a to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name {DOMAIN} www.{DOMAIN} {IP_ADDR};
root /var/www/vhosts/{DOMAIN}/public;
include /etc/nginx/default.d/*.conf;
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires max;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment