Parcourir la source

add php ngx conf

abiao il y a 5 ans
Parent
commit
97a6e2b483
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      webApp/common/nginx_conf/ngx_test.conf

+ 6 - 2
webApp/common/nginx_conf/ngx_test.conf

@@ -30,10 +30,14 @@ server {
     #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;
+    root   /home/www/yii2_app/webApp/frontend/web/;
     index  index.php index.html index.htm;
     try_files $uri $uri/ /index.php?$args;
-
+    location / {
+       try_files $uri $uri/ /index.html;
+       expires  30d;
+      #rewrite ^(.*)$ /static/maintain.html break;
+    }
 
     location ~ \.php$ {
         fastcgi_pass   127.0.0.1:9000;