Nginx+ThinkPHP rewrite

未结帖
0 2036
ajian jhon 2016-12-03
悬赏:5飞吻
server {
        listen       8001;
        server_name  localhost;
   index index.html index.htm index.php;
   root /alidata/www/jimmyblog/wwwroot;
   location ~ .*\.(php|php5)?$
   {
      #fastcgi_pass  unix:/tmp/php-cgi.sock;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fastcgi.conf;
   }
   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
   {
      expires 30d;
   }
   location ~ .*\.(js|css)?$
   {
      expires 1h;
   }
    location / {
       if (!-e $request_filename) {
       rewrite ^(.*)$ /index.php?s=$1 last;
       break;
        }
     }

   #include /alidata/server/nginx/conf/rewrite/jimmyblog.conf;
   access_log  /alidata/log/nginx/access/jimmyblog.log;
}


热忱回答0


最近热帖

近期热议

  1. javascript——prototype与__proto 9
  2. Mysql 中出现的Data truncated for column 3
  3. 在nginx中使用x-sendfile的解决方案 3
  4. 高版本jQuery面插件实现Ajax上传图片 1
  5. Thinkphp Socket.class.php 类的使用 1
  6. 使用ionic3创建第一个App 0
  7. ios-oc html5 0
  8. nginx.conf 0
  9. 基于ionic3.4.0的项目搭建 0
  10. php 缩略图 0