Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting expires for dokuwiki lib directory on nginx stops processing .php files

Tags:

nginx

debian

I'm trying install DocuWiki script on nginx web server. Documentation says that I need to put following directive at nginx config file:

location ^~ /lib/ {
   expires 30d;
}

When I try to add this, nginx stops sending .php files from lib directory to php-fpm, and send it to me like octet-streams for download. How can I correct this?

like image 602
SimWhite Avatar asked Sep 18 '25 18:09

SimWhite


1 Answers

Here is the working configuration:

    location ~ ^/lib.*\.(gif|png|ico|jpg)$ {
                    expires 30d;
            }
like image 191
SimWhite Avatar answered Sep 21 '25 14:09

SimWhite