nginx.conf:サーバーの構成を変更します
サーバー{
文字セットUTF-8;
128Mをclient_max_body_size。
80を聞きます。
SERVER_NAME local.yii2test.com
index.htmlのindex.htmのindex.phpのインデックス。
ルートは/ usr / local / nginxの/ HTML / yii2test /ウェブ。
場所〜\ phpの$ {
ルートは/ usr / local / nginxの/ HTML / yii2test /ウェブ。
fastcgi_pass 127.0.0.1:9000。
fastcgi_indexのindex.phpを。
fastcgi_paramsが含まれます。
}
コードを使用して#yiiフレーム
位置/ {
index.phpに実際のファイルではありません#リダイレクトすべて
try_files $ URI $ uriの/ /index.php?$args。
}
場所〜/\.ht {
すべてを否定します。
}
}