柳暗花明笔记

    Nginx下Zend 设置问题

    所属分类:[ php&web ] 猫哲学家 发表于:2012-07-30 21:56 浏览:387

    server {
            listen 80;
            server_name domain.com;
            root /app/audit/public/domain.com;

     

            access_log  /app/audit/logs/domain.com.log main;
            error_log   /app/audit/logs/domain.com.log;

     

            location / {
                index  index.php;
            # If file not found, redirect to Zend handling, we can remove the (if) here and go directly rewrite
                if (!-f $request_filename){
                    rewrite ^/(.+)$ /index.php?$1& last;
                }
            }
            location ~* ^.+\.(js|ico|gif|jpg|jpeg|pdf|png|css)$ {
              access_log   off;
              expires      7d;
            }
            location ~ .*\.php?$ {
                fastcgi_pass   127.0.0.1:36;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
             error_page  404             http://www.domain.com/error
       }
    标签: nginx 
    上一编文章 Ubuntu自带的播放器乱码问题 下一编文章 功能强大的视频格式转换器 ffmpeg
    最近文章
    发表评论