发布于 1970-01-01 08:00
  • 1 个回答
    • 研究了两天终于弄好了,代码放到/edu/web/目录下
      主要是找到了调试方法,error_log logs/error.log debug;
      增加上debug,可以看到详细的调试情况

      =`########edu eduweb
      location /edu/web {

                  alias html/edu/web;
          index app.php;
      
          try_files $uri @rewriteapp; 

      }

      location @rewriteapp {
         rewrite ^/edu/web/(.*)$ /edu/web/app.php/$1 last;

      }

      location ~ ^/udisk {
      
          internal;
      
          root html/edu/app/data/;
      
      }
      
      location ~ ^/edu/web/(app|app_dev)\.php(/|$) {
      
          fastcgi_pass   php_processes;
                  fastcgi_split_path_info ^(.+\.php)(/.*)$;
          include fastcgi_params;
          fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
          fastcgi_param  HTTPS off;
          fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
      
          fastcgi_param HTTP_X-Accel-Mapping /udisk=html/edu/app/data/udisk;
      
          fastcgi_buffer_size 128k;
      
          fastcgi_buffers 8 128k;
      

      }

                      location ~* \.(jpg|jpeg|gif|png|ico|swf)$ {
                      
                      expires 3y;
                      
                      access_log off;
                      
                      gzip off;
                      
                      }
                      
                      location ~* \.(css|js)$ {
                      
                      access_log off;
                      
                      expires 3y;
                      
                      }
                      
                      location ~ ^/edu/files/.*\.(php|php5)$ {
                      
                      deny all;
                      
                      }
                      ########edu`
      2022-11-30 22:59 回答
    撰写答案
    今天,你开发时遇到什么问题呢?
    立即提问
    PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
    Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有