|
|
@@ -20,4 +20,29 @@ server {
|
|
|
include fastcgi_params;
|
|
|
try_files $uri =404;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+server {
|
|
|
+ listen 80;
|
|
|
+ client_max_body_size 4G;
|
|
|
+ server_name yii2_front.hiwavo.com;
|
|
|
+ #keepalive_timeout 5;
|
|
|
+ access_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_access.log main;
|
|
|
+ error_log /home/www/yii2_app/webApp/common/nginx_conf/log/ngx_error.log;
|
|
|
+ root /home/www/yii2_app/webApp/frontend/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;
|
|
|
+ }
|
|
|
}
|