• 使用nginx运行thinkphp的nginx配置


        location / {
            index index.php;
            #如果文件不存在则尝试TP解析
            if (!-e $request_filename) {
               rewrite  ^(.*)$  /index.php?s=/$1  last;
               break;
            }
        }
    
        location ~ .+.php($|/) {
            fastcgi_pass unix:/dev/shm/php-fcgi.sock;
            #fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
    
            #设置PATH_INFO,注意fastcgi_split_path_info已经自动改写了fastcgi_script_name变量,
            #后面不需要再改写SCRIPT_FILENAME,SCRIPT_NAME环境变量,所以必须在加载fastcgi.conf之前设置
            fastcgi_split_path_info ^(.+.php)(/.*)$;
            fastcgi_param PATH_INFO $fastcgi_path_info;
    
            #加载Nginx默认"服务器环境变量"配置
            include fastcgi.conf;
        }
    

      

  • 相关阅读:
    Google提出的新型激活函数:Swish
    Rosonblatt线性感知器
    Rosonblatt线性感知器
    毕业的到来
    陌生人
    学会感恩
    session和el表达式
    cooking和session
    不離不棄
    生活
  • 原文地址:https://www.cnblogs.com/phonecom/p/8924267.html
Copyright © 2020-2023  润新知