Skip to content

Instantly share code, notes, and snippets.

@alexglue
Last active August 29, 2015 14:13
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 alexglue/4bb87b409bdf0159fc5f to your computer and use it in GitHub Desktop.
Save alexglue/4bb87b409bdf0159fc5f to your computer and use it in GitHub Desktop.
Yii nginx+php-fpm minimal nginx.conf #devel
upstream yii-php-fpm {
server unix:/var/run/php5-fpm.sock;
#server 127.0.0.1:9001;
}
server {
listen 80 default;
server_name localhost;
root /var/www/$host/public;
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass yii-php-fpm;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment