Last active
December 31, 2020 17:24
-
-
Save caquino/5580730 to your computer and use it in GitHub Desktop.
Poors Main ESI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cached: <!--# echo var="date_local" --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uncached: <!--# echo var="date_local" --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main: <!--# echo var="date_local" --> | |
<!--# block name="cached" --> <!--# endblock --> | |
<!--# include virtual="/cached/" stub="cached" --> | |
<!--# block name="uncached" --> <!--# endblock --> | |
<!--# include virtual="/uncached/" stub="uncached" --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=default:10m; | |
server { | |
listen 80; | |
server_name localhost; | |
location / { | |
ssi on; | |
proxy_cache default; | |
proxy_cache_valid 5m; | |
proxy_pass http://localhost:81; | |
} | |
location /uncached { | |
ssi on; | |
proxy_pass http://localhost:81; | |
} | |
} | |
server { | |
listen 81; | |
server_name localhost; | |
index index.shtml; | |
root /var/www; | |
location /cached { | |
ssi on; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@server:~# wget -q -O - http://localhost/ | |
Main: Tuesday, 14-May-2013 22:01:07 BRT | |
Cached: Tuesday, 14-May-2013 21:59:41 BRT | |
Uncached: Tuesday, 14-May-2013 22:01:07 BRT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment