server { listen 80; server_name localhost; root /vagrant/htdocs; index index.php index.html; charset utf-8; location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri /index.php; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; } }