Skip to content

Instantly share code, notes, and snippets.

@asaelx
Last active August 29, 2015 14:19
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 asaelx/58c68b06e2a0d582aa83 to your computer and use it in GitHub Desktop.
Save asaelx/58c68b06e2a0d582aa83 to your computer and use it in GitHub Desktop.
Nginx Config for LEMP
server {
listen 80;
root /vagrant;
index index.php index.html index.htm;
server_name veinte.dev;
location / {
try_files $uri /index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /vagrant;
}
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
location ~ \.php$ {
try_files $uri /index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
sendfile off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment