Log日志提示:Access to debugger is denied due to IP address restriction. The requesting IP address is 192.168.xx.xx
主是原因是:
在YII2开启了伪静态:
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'suffix' => '.html',
'rules' => [
"<controller:\w+>/<action:\w+>" => "<controller>/<action>"
],
],
一开始,使用的是apache,现在换到nginx,所以,导致伪静态不可使用,在nginx配置中,设置nginx伪静态设置。
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}