admin 发表于 2021-4-16 18:05:42

PHP多项目调试与发布

#4个PHP项目安装与调试:
1.phpMyAdmin:可以管理所有项目的数据库
2.discuz: 论坛项目
3.wordpress: 博客项目
4.tpapp: tp框架小项目

#ThinkPHP框架在Nginx下配置隐藏入口设置:
1.location配置
location / {
    indexindex.php index.html index.htm;

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

2.PHP-Fpm配置
location ~ \.php(.*)$ {
    fastcgi_indexindex.php;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_paramSCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_paramPATH_INFO $1;
    include      fastcgi_params;
}

页: [1]
查看完整版本: PHP多项目调试与发布