Last active
June 3, 2018 12:49
-
-
Save sergejmueller/6113816 to your computer and use it in GitHub Desktop.
Erweiterung der Nginx-Konfigurationsdatei für Cachify Memcached-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 / { | |
error_page 404 405 = @nocache; | |
if ( $query_string ) { | |
return 405; | |
} | |
if ( $request_method = POST ) { | |
return 405; | |
} | |
if ( $request_uri ~ "/wp-" ) { | |
return 405; | |
} | |
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) { | |
return 405; | |
} | |
default_type text/html; | |
add_header X-Powered-By Cachify; | |
set $memcached_key $host$uri; | |
memcached_pass localhost:11211; | |
} | |
## NOCACHE LOCATION | |
location @nocache { | |
try_files $uri $uri/ /index.php?$args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Sergej,
shouldn´t it be:
With my permalink setup it won´t work with only 405.
Regards,
Ulrich