Welcome! Log In Create A New Profile

Advanced

Expires - External files

Posted by Claick 
Expires - External files
January 15, 2013 02:51PM
I needed a solution to set expires in external files, because in some sites check the loading time of the web page where brought urls as external source, without css expires and thus lowering the score. Checking the internet I found something, some forms having to compile nginx with modules not so well known, preferred to try it another way.

Then I had the following idea of ​​creating a vhost where there the following lines:

server {

         listen 80;

         server_name proxy.domain.com;

         location / {file.js

                 proxy_pass http://externaldomain.com/file.js;
                 expires 30d;

         }

}

What do you think?

Had another way to do?

I hope I helped some people like me who could not otherwise.

Sorry for my English.



Edited 1 time(s). Last edit at 01/15/2013 02:52PM by Claick.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 160
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready