huanglong

huanglong

这家伙有点懒,还没写个性签名!

  • 财富值4996
  • 威望值0
  • 总积分5166

个人信息

  • 回复了 的回答

    这个很简单,你按着我的配置来即可。

    server {
            charset utf-8;
            client_max_body_size 128M;
            listen          80;
            server_name     local.yii2test.com
            index           index.php index.html index.htm;
            root            /usr/local/nginx/html/yii2test/web;
    
            location ~ \.php$ {
                root           /usr/local/nginx/html/yii2test/web;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                include        fastcgi_params;
            }
            #yii框架使用代码
            location / {
                # Redirect everything that isn't a real file to index.php
                try_files $uri $uri/ /index.php?$args;
            }
    
            location ~ /\.ht {
                    deny  all;
            }
        }
    

    上面我给你做了一个虚拟域名,你按着我的配置就可以正常访问了。 url 最终是这样的 local.yii2test.com/index

    改了也没用啊,只要我把 ?r= 这个一去掉,就报404

  • 提出了问题
    yii2 新手,求助 url 优化 问题
  • 回复了 的回答

    你的那种方法路径是错的,递交到这个路径/index.php?r=index/index

    这样写报错了:No input file specified.

  • 提出了问题
    Form 表单问题
  • 2015-05-18 已签到
    连续签到1天,获得了5个金钱
  • 2015-05-11 已签到
    连续签到1天,获得了5个金钱
副总裁 等级规则
5166/10000
资料完整度
30/100
用户活跃度
0/100

Ta的关注

1

Ta的粉丝

4

Ta的访客

5