ソースを参照

add php ngx conf

abiao 5 年 前
コミット
391d82c57c
共有1 個のファイルを変更した4 個の追加0 個の削除を含む
  1. 4 0
      webApp/common/nginx_conf/ngx_test.conf

+ 4 - 0
webApp/common/nginx_conf/ngx_test.conf

@@ -38,6 +38,10 @@ server {
         alias /home/www/yii2_app/webApp/frontend/web/uploads/;
     }
 
+    location ~ /api/(?!index.php).*$ {
+        rewrite /api/(.*) /api/index.php?r=$1 last;
+    }
+
     location ~ \.php$ {
         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;