Created
July 23, 2013 12:43
-
-
Save outman/6062074 to your computer and use it in GitHub Desktop.
php framework yaf with nginx & php-fpm
This file contains hidden or 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
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Helped me a lot.