• TP5 nginx 配置


    from dolpinPHP

    server {
            listen       80;
            server_name  www.dolphinphp.com *.dolphinphp.com;
            root   "/home/www/wwwroot/dolphinphp";
            location / {
                index  index.html index.htm index.php;
                    #主要是这一段一定要确保存在
                    if (!-e $request_filename) {
                        rewrite  ^(.*)$  /index.php?s=$1  last;
                        break;
                    }
                    #结束
                #autoindex  on;
            }
            location ~ .php(.*)$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_split_path_info  ^(.+.php)(.*)$;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO  $fastcgi_path_info;
                fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
                include        fastcgi_params;
            }
    }

    坑爹的TP5

    server {
        listen 80;
        server_name    mydomain.vm    www.mydomain.vm;
        access_log    /app/logs/nginx/mydomain_access.log;
        error_log    /app/logs/nginx/mydomain_error.log;
        set        $root    /app/www/mydomain.vm/public;
        location ~ .*.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
        {
            root $root;
        }
        location / {
            root    $root;
            index    index.html index.php;
            if ( -f $request_filename) {
                break;
            }
            if ( !-e $request_filename) {
                rewrite ^(.*)$ /index.php/$1 last;
                break;
            }
        }
        location ~ .+.php($|/) {
            set $script $uri;
            set $path_info "";
            if ($uri ~ "^(.+.php)(/.+)") {
                set $script $1;
                set $path_info $2;
            }
            fastcgi_pass    unix:/run/php/php7.0-fpm.sock;
            fastcgi_index    index.php?IF_REWRITE=1;
            fastcgi_param    PATH_INFO    $path_info;
            fastcgi_param    SCRIPT_FILENAME    $root$fastcgi_script_name;
            fastcgi_param    SCRIPT_NAME    $script;
            include        fastcgi_params;
        }
    }
    

      

  • 相关阅读:
    BZOJ3562 : [SHOI2014]神奇化合物
    BZOJ3559 : [Ctsc2014]图的分割
    BZOJ3551 : [ONTAK2010]Peaks加强版
    BZOJ3542:DZY Loves March
    李洪强iOS开发之
    iOS学习之iOS沙盒(sandbox)机制和文件操作1
    iOS学习之iOS沙盒(sandbox)机制和文件操作
    stringByAppendingPathComponent和stringByAppendingString 的区别
    iOS开发:Toast for iPhone
    深度解析开发项目之 01
  • 原文地址:https://www.cnblogs.com/fenle/p/10075426.html
Copyright © 2020-2023  润新知