Skip to content

Instantly share code, notes, and snippets.

@outman
Created July 23, 2013 12:43
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 outman/6062074 to your computer and use it in GitHub Desktop.
Save outman/6062074 to your computer and use it in GitHub Desktop.
php framework yaf with nginx & php-fpm
server {
set $htdocs /home/libaochang/data/orange/public;
listen 80;
server_name xmprs.com;
location / {
root $htdocs;
autoindex on;
index index.php index.html;
if (!-e $request_filename){
rewrite ^/(.*) /index.php?$1 last;
}
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9999;
fastcgi_param SCRIPT_FILENAME $htdocs$fastcgi_script_name;
}
}
@yura415
Copy link

yura415 commented Dec 13, 2013

Thanks! Helped me a lot.

@cugblbs
Copy link

cugblbs commented Jul 13, 2015

thanks...solved my problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment