kiddkyd

kiddkyd

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

  • 财富值10
  • 威望值0
  • 总积分10

个人信息

  • 提出了问题
    严重怀疑yii2的restful教程是乱写的
  • 回复了 的回答

    直接浏览器 network 去看吧 有错误信息返回的

    就是错误500,远程服务器发生错误啊。。。。

  • 回复了 的回答

    直接在服务器上访问,查看debug信息。

    自己就是服务器啊。。

  • 回复了 的回答

    楼主 你好 不知道你用nginx怎么配置restful api的虚拟域名访问的? 我配置如下,但是一直报404错误,困扰我很久了



    server {
    charset utf-8;
    client_max_body_size 128M;
    set $fcgi_server 127.0.0.1:9000;
    
    listen 80; ## listen for ipv4
    
    server_name api.denghp.com;
    root        /home/denghp/webroot/yii2-advanced-api/api/web;
    index       index.php;
    
    access_log  /usr/local/nginx/logs/yii2_demo_api_access.log main;
    error_log   /usr/local/nginx/logs/yii2_demo_api_error.log;
    
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    
    location ~ \.php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_pass $fcgi_server;
    }
    
    location ~ /\.(ht|svn|git) {
        deny all;
    }
    

    }


    访问地址,都试过

    http://api.denghp.com/v1/countries
    http://api.denghp.com/v1/country

    可以试试upupw

  • 2015-08-10 已签到
    连续签到2天,获得了10个金钱
  • 2015-08-09 已签到
    连续签到1天,获得了5个金钱
实习生 等级规则
10/20
资料完整度
0/100
用户活跃度
10/100

Ta的关注

0

Ta的粉丝

0

Ta的访客

3