0
点赞
收藏
分享

微信扫一扫

tp5 nginx配置

安七月读书 2022-04-13 阅读 52
nginxphp
server {
        listen       80;
        root /www/web/crm_webvtao_com/public_html;
        server_name crm.test.com;
        index  index.html index.php index.htm;
        error_page  400 /errpage/400.html;
        error_page  403 /errpage/403.html;
        error_page  404 /errpage/404.html;
        error_page  503 /errpage/503.html;
        location ~ \.php(.*)$ {
                fastcgi_pass  unix:/tmp/php-73-cgi.sock;
                fastcgi_index  index.php;
                //以下三行诗tp5 pathinfo的重要内容
				fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
        		fastcgi_param PATH_INFO $fastcgi_path_info;
        		fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
        		fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
        		include fastcgi_params;
        }
        
        location / {
                 try_files $uri $uri/ /?$args;
include /www/wdlinux/wdcp/rewrite/nginx.conf;
        }
        
}

举报

相关推荐

0 条评论