thinkphp6 nginx配置

server {
    listen 88;
    server_name localhost;
    root /www/tp/public;
    index index.php index.html index.htm;
    charset utf-8;


    location / {
            if (!-e $request_filename) {
                    rewrite ^/index.php(.*)$ /index.php?=s=$1 last;
                    rewrite ^(.*)$ /index.php/$1 last;
            }
} location
~ \.php(/|$) { fastcgi_pass unix:/tmp/php-cgi-74.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $fastcgi_script_name2 $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; } }

 

posted @ 2023-07-05 19:54  包子心的土豆  阅读(598)  评论(0编辑  收藏  举报