Last active
August 29, 2015 14:13
-
-
Save alexglue/4bb87b409bdf0159fc5f to your computer and use it in GitHub Desktop.
Yii nginx+php-fpm minimal nginx.conf #devel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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