TP3项目部署服务器问题

八云麻美子 2018-05-21 05:02:58
www.xxx.com/模块/控制器/操作 这样是我现在的,不能打开
www.xxx.com/index.php/模块/控制器/操作 加上入口文件后可以正常打开
网上搜了说是服务器不支持pathinfo
请问该怎么修改配置
nginx
...全文
1734 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
一生小白 2018-05-31
  • 打赏
  • 举报
回复
server{ listen 80; server_name www.demo2.com; #绑定域名 location / { root /data/html/demo2; index index.php index.html index.htm; } location ~ \.php$ { root /data/html/demo1; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /data/html/demo2$fastcgi_script_name; include fastcgi_params; } }
伟洪winni 2018-05-22
  • 打赏
  • 举报
回复

server {
        listen       80;
        server_name  XXXXXXXXXX ;
        root   "XXXXXXXXXX";
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
            
            if (!-e $request_filename) {
              rewrite ^(.*)$ /index.php/$1 last;
              break;
            }
            
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO $1;
            include        fastcgi_params;
        }
}

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧