Skip to content

Instantly share code, notes, and snippets.

@alexglue
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save alexglue/4bb87b409bdf0159fc5f to your computer and use it in GitHub Desktop.

Select an option

Save alexglue/4bb87b409bdf0159fc5f to your computer and use it in GitHub Desktop.

Revisions

  1. alexglue revised this gist Jan 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nginx.conf
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ server {
    listen 80 default;
    server_name localhost;

    root /home/glue/proj/$host/public;
    root /var/www/$host/public;
    index index.php;

    charset utf-8;
  2. alexglue created this gist Jan 13, 2015.
    27 changes: 27 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    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 /home/glue/proj/$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;
    }

    }