Skip to content

Instantly share code, notes, and snippets.

@rummik
Created July 9, 2013 19:07
Show Gist options
  • Save rummik/5960281 to your computer and use it in GitHub Desktop.
Save rummik/5960281 to your computer and use it in GitHub Desktop.
Nginx configs have gotten really short.
server {
server_name example.com;
return 301 http://www.example.com$uri;
}
server {
server_name www.example.com;
root /var/www/example.com;
try_files $uri /index.php?$args;
location /index.php {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment