Last active
August 21, 2017 18:14
-
-
Save sergejmueller/1939164 to your computer and use it in GitHub Desktop.
Erweiterung der Nginx-Konfigurationsdatei für Cachify Festplatten-Caching
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
## GZIP | |
gzip_static on; | |
## CHARSET | |
charset utf-8; | |
## INDEX LOCATION | |
location / { | |
if ( $query_string ) { | |
return 405; | |
} | |
if ( $request_method = POST ) { | |
return 405; | |
} | |
if ( $request_uri ~ /wp-admin/ ) { | |
return 405; | |
} | |
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { | |
return 405; | |
} | |
error_page 405 = @nocache; | |
try_files /wp-content/cache/cachify/${host}${uri}index.html @nocache; | |
} | |
## NOCACHE LOCATION | |
location @nocache { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
## PROTECT CACHE | |
location ~ /wp-content/cache { | |
internal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment