直接上nginx的配置吧:

  1. server {
  2. listen 80;
  3. server_name foo.com;
  4. root /path;
  5. index index.html index.htm index.php;
  6. location / {
  7. try_files $uri $uri/ /index.php$is_args$args;
  8. }
  9. location ~ \.php$ {
  10. try_files $uri =404;
  11. include fastcgi.conf;
  12. fastcgi_pass 127.0.0.1:9000;
  13. }
  14. }

分类: web

标签:   php   nginx