错误信息如下:
~~~
2017-05-11 11:18:25
[10.255.0.3][148667][-][warning][yii\debug\Module::checkAccess] Access
to debugger is denied due to IP address restriction. The requesting IP
address is 10.255.0.3
2017-05-11 11:18:25 [10.255.0.3][148667][-][info][application] $_POST
= [
'deviceUuid' => '88FE942E-3B44-4096-BBE1-D434CED9AD01'
'actionName' => 'open_sign_getmoney'
'appVersion' => '2.0.2'
'accessToken' => '1736f0753dae453fb660f5be4e868705'
'clientid' => 'ios'
]
$_SERVER = [
'SUPERVISOR_SERVER_URL' => 'unix:///dev/shm/supervisor.sock'
'SHLVL' => '1'
'OLDPWD' => '/'
'HOSTNAME' => '134fa2891cfd'
'SUPERVISOR_ENABLED' => '1'
'SUPERVISOR_PROCESS_NAME' => 'php-fpm7'
'PWD' => '/var/www/html'
'SUPERVISOR_GROUP_NAME' => 'php-fpm7'
'HOME' => '/var/lib/nginx'
'PATH' =>
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
'USER' => 'nginx'
'HTTP_ACCEPT_ENCODING' => 'gzip, deflate'
'HTTP_ACCEPT_LANGUAGE' => 'zh-cn'
'HTTP_USER_AGENT' => 'RapidLoan/201704271840 CFNetwork/808.3
Darwin/16.3.0'
'HTTP_ACCEPT' => '*/*'
'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
'HTTP_CONTENT_LENGTH' => '152'
'HTTP_CONNECTION' => 'close'
'HTTP_X_FORWARDED_FOR' => '119.137.54.249'
'HTTP_REMOTE_HOST' => '119.137.54.249'
'HTTP_X_REAL_IP' => '119.137.54.249'
'HTTP_HOST' => 'dev.api2.jiumiaodai.com'
'REDIRECT_STATUS' => '200'
'SERVER_NAME' => '_'
'SERVER_PORT' => '80'
'SERVER_ADDR' => '10.255.0.4'
'REMOTE_PORT' => '38680'
'REMOTE_ADDR' => '10.255.0.3'
'SERVER_SOFTWARE' => 'nginx/1.10.3'
'GATEWAY_INTERFACE' => 'CGI/1.1'
'REQUEST_SCHEME' => 'http'
'SERVER_PROTOCOL' => 'HTTP/1.0'
'DOCUMENT_ROOT' => '/var/www/html/api/web'
'DOCUMENT_URI' => '/index.php'
'REQUEST_URI' => '/action-log'
'CONTENT_LENGTH' => '152'
'CONTENT_TYPE' => 'application/x-www-form-urlencoded'
'REQUEST_METHOD' => 'POST'
'QUERY_STRING' => ''
'SCRIPT_NAME' => '/index.php'
'SCRIPT_FILENAME' => '/var/www/html/api/web/index.php'
'FCGI_ROLE' => 'RESPONDER'
'PHP_SELF' => '/index.php'
'REQUEST_TIME_FLOAT' => 1494472705.8006
'REQUEST_TIME' => 1494472705
]
~~~
原因:
因为debug默认只允许本地(127.0.0.1)启用调试器
解决办法:
~~~
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs'=>['*'], // 允许任何ip都可以调试
];
}
~~~
- 前文
- 安装前的准备
- windows安装Composer
- Linux安装Composer
- 开始使用
- 安装yii2.0
- 初始化项目
- 检测运行环境
- 数据库
- 连接数据库
- 添加
- 查询
- join
- joinWith
- with
- asArray
- offset
- filterWhere
- 关联查询
- 更新
- AR更新
- with和JoinWith的区别?
- Yii2.0框架基础--数据查询之AR类方法一
- 数据库迁移Migration
- 查看最后执行SQL语句
- 事务处理
- 例子
- 控制器
- rules验证方法
- behaviors行为
- actions动作
- 模型
- 模型使用
- attributeLabels
- tableName
- fields
- 视图
- 显示视图
- 获取配置参数
- 格式化时间显示
- Activeform效果
- Activeform表单部分组件使用方法
- RESTful服务
- 版本化控制
- 邮件mail
- 邮件配置
- 邮件样板
- session
- Yii2.0 Session操作大全(增、删、改、销毁、Session数组赋值、读取)
- 缓存
- 跨APP读取缓存(文件缓存)
- Memcache
- 最佳实践
- 控制器
- 模型
- 视图
- 常见问题
- 解决根目录没有vendor目录
- 安装composer-asset插件错误
- Url隐藏index.php
- nginx配置
- Apache配置
- 配置
- 设置系统默认中文提示
- 数据库问题
- where和andWhere不能同时使用吗?
- debug
- 编辑器使用技巧
- phpstorm
- Redis
- redis安装
- redis例子
- RBAC
- Redis和memcache概念
- 生成接口文档
- Swagger安装
- Swagger语法
- 扩展
- 七牛云存储
- 视频缩略图
- Pjax
- A链接不能跳转解决办法