|
@@ -0,0 +1,23 @@
|
|
|
|
|
+server {
|
|
|
|
|
+ listen 80;
|
|
|
|
|
+ client_max_body_size 4G;
|
|
|
|
|
+ server_name yii2_admin.hiwavo.com;
|
|
|
|
|
+ #keepalive_timeout 5;
|
|
|
|
|
+ access_log /home/www/yii2_app/webApp/common/log/ngx_access.log main;
|
|
|
|
|
+ error_log /home/www/yii2_app/webApp/common/log/ngx_error.log;
|
|
|
|
|
+ root /home/www/yii2_app/webApp/common/backend/web;
|
|
|
|
|
+ index index.php index.html index.htm;
|
|
|
|
|
+ try_files $uri $uri/ /index.php?$args;
|
|
|
|
|
+
|
|
|
|
|
+ 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;
|
|
|
|
|
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
|
+ include fastcgi_params;
|
|
|
|
|
+ try_files $uri =404;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|