nginx.conf

server {
    listen       80;
    server_name s.huailaixx.com;
    charset utf-8;

    location ~ \.php {
        root   /data0/www/test_hlxx/public;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;

        fastcgi_split_path_info  ^((?U).+\.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;
    }

    location / {
        root   /data0/www/test_hlxx/public;
        index  index.html index.htm index.php;

        if (!-e $request_filename) {
            rewrite ^/(.*)$ /index.php/$1 last;  
            break;
        }
    }
}

php.ini

cgi.fix_pathinfo=1

 

相关文章:

  • 2022-02-16
  • 2022-12-23
  • 2021-11-27
  • 2021-09-08
  • 2021-11-28
  • 2021-05-24
  • 2022-02-08
  • 2022-03-06
猜你喜欢
  • 2021-10-16
  • 2021-09-08
  • 2022-12-23
  • 2021-09-13
  • 2021-09-08
相关资源
相似解决方案