nginx sample moved to file git-svn-id: http://plugins.svn.wordpress.org/wp-ffpc/trunk@508072 b8457f37-d9ea-0310-8a92-e5e31aec5664
cadeyrn cadeyrn@b8457f37-d9ea-0310-8a92-e5e31aec5664
Tue, 21 Feb 2012 06:50:05 +0000
1 files changed,
7 insertions(+),
13 deletions(-)
jump to
M
wp-ffpc.php
→
wp-ffpc.php
@@ -363,20 +363,14 @@ <?php if ( $this->options['cache_type'] == 'memcache' ) : ?>
<fieldset class="grid50"> <legend><?php _e('Sample config for nginx to utilize the data entries', WP_FFPC_PARAM); ?></legend> - <pre>location / { - try_files $uri $uri/ @memcached; -} - -location @memcached { - default_type text/html; - set $memcached_key <?php echo $this->options['prefix_data'];?>$host$request_uri; - memcached_pass <?php echo $this->options['host'];?>:<?php echo $this->options['port'];?>; - error_page 404 = @rewrites; -} + <?php + $search = array( 'DATAPREFIX', 'MEMCACHEDHOST', 'MEMCACHEDPORT'); + $replace = array ( $this->options['prefix_data'], $this->options['host'], $this->options['port'] ); + $nginx = file_get_contents ( WP_FFPC_DIR .'/nginx-sample.conf' ); + $nginx = str_replace ( $search , $replace , $nginx ); -location @rewrites { - rewrite ^(.*)$ /index.php?q=$1 last; -}</pre> + ?> + <pre><?php echo $nginx; ?></pre> </fieldset> <? endif; ?>