Pārlūkot izejas kodu

add php ngx conf

abiao 5 gadi atpakaļ
vecāks
revīzija
a6e48ffdec
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      webApp/common/nginx_conf/ngx_test.conf

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

@@ -34,8 +34,9 @@ server {
     index  index.php index.html index.htm;
     try_files $uri $uri/ /index.php?$args;
 
-    location ~ /uploads${
-         root /home/www/yii2_app/webApp/frontend/web/uploads/;
+    location ~* \.(gif|jpg|png)$ {
+       root /home/www/yii2_app/webApp/frontend/web/uploads/;
+       expires 30d;
     }
     location ~ \.php$ {
         fastcgi_pass   127.0.0.1:9000;