installed plugin W3 Total Cache
version 2.3.2
This commit is contained in:
@ -0,0 +1,48 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# Gzip compression
|
||||
# Compress content before it is delivered to the client
|
||||
# http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
<ifmodule mod_deflate.c="">
|
||||
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
|
||||
<ifmodule mod_setenvif.c="">
|
||||
<ifmodule mod_headers.c="">
|
||||
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
|
||||
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
|
||||
</ifmodule>
|
||||
</ifmodule>
|
||||
|
||||
<ifmodule filter_module="">
|
||||
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
|
||||
FilterDeclare COMPRESS
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$text/html'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$text/css'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$text/plain'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$text/xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$text/x-component'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/javascript'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/json'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/xhtml+xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/rss+xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/atom+xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/vnd.ms-fontobject'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$image/svg+xml'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$image/x-icon'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$application/x-font-ttf'"
|
||||
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = '$font/opentype'"
|
||||
FilterChain COMPRESS
|
||||
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
|
||||
</ifmodule>
|
||||
|
||||
<ifmodule mod_filter.c="">
|
||||
# Legacy versions of Apache
|
||||
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
|
||||
AddOutputFilterByType DEFLATE application/javascript
|
||||
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
|
||||
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
|
||||
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
|
||||
</ifmodule>
|
||||
|
||||
</ifmodule>
|
@ -0,0 +1,96 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# Cache Control via HTTP Headers + Expires
|
||||
# Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
|
||||
# http://httpd.apache.org/docs/2.0/mod/mod_headers.html
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Expires Defaults
|
||||
<ifmodule mod_expires.c="">
|
||||
ExpiresActive On
|
||||
# Set default expires to 2 days
|
||||
ExpiresDefault A172800
|
||||
ExpiresByType text/css A31536000
|
||||
ExpiresByType application/x-javascript A31536000
|
||||
ExpiresByType text/x-component A31536000
|
||||
ExpiresByType text/html A3600
|
||||
ExpiresByType text/richtext A3600
|
||||
ExpiresByType image/svg+xml A3600
|
||||
ExpiresByType text/plain A3600
|
||||
ExpiresByType text/xsd A3600
|
||||
ExpiresByType text/xsl A3600
|
||||
ExpiresByType text/xml A3600
|
||||
ExpiresByType video/asf A31536000
|
||||
ExpiresByType video/avi A31536000
|
||||
ExpiresByType image/bmp A31536000
|
||||
ExpiresByType application/java A31536000
|
||||
ExpiresByType video/divx A31536000
|
||||
ExpiresByType application/msword A31536000
|
||||
ExpiresByType application/vnd.ms-fontobject A31536000
|
||||
ExpiresByType application/x-msdownload A31536000
|
||||
ExpiresByType image/gif A31536000
|
||||
ExpiresByType application/x-gzip A31536000
|
||||
ExpiresByType image/x-icon A31536000
|
||||
ExpiresByType image/jpeg A31536000
|
||||
ExpiresByType application/vnd.ms-access A31536000
|
||||
ExpiresByType audio/midi A31536000
|
||||
ExpiresByType video/quicktime A31536000
|
||||
ExpiresByType audio/mpeg A31536000
|
||||
ExpiresByType video/mp4 A31536000
|
||||
ExpiresByType video/ogg A31536000
|
||||
ExpiresByType video/mpeg A31536000
|
||||
ExpiresByType application/vnd.ms-project A31536000
|
||||
ExpiresByType application/x-font-otf A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.database A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
|
||||
ExpiresByType application/vnd.oasis.opendocument.text A31536000
|
||||
ExpiresByType audio/ogg A31536000
|
||||
ExpiresByType application/pdf A31536000
|
||||
ExpiresByType image/png A31536000
|
||||
ExpiresByType application/vnd.ms-powerpoint A31536000
|
||||
ExpiresByType audio/x-realaudio A31536000
|
||||
ExpiresByType image/svg+xml A31536000
|
||||
ExpiresByType application/x-shockwave-flash A31536000
|
||||
ExpiresByType application/x-tar A31536000
|
||||
ExpiresByType image/tiff A31536000
|
||||
ExpiresByType application/x-font-ttf A31536000
|
||||
ExpiresByType audio/wav A31536000
|
||||
ExpiresByType audio/wma A31536000
|
||||
ExpiresByType application/vnd.ms-write A31536000
|
||||
ExpiresByType application/vnd.ms-excel A31536000
|
||||
ExpiresByType application/zip A31536000
|
||||
</ifmodule>
|
||||
|
||||
# No caching for dynamic files
|
||||
<filesmatch>
|
||||
ExpiresDefault A0
|
||||
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
|
||||
Header set Pragma "no-cache"
|
||||
</filesmatch>
|
||||
|
||||
# 1 MIN
|
||||
<filesmatch>
|
||||
ExpiresDefault A60
|
||||
Header set Cache-Control "max-age=60, must-revalidate"
|
||||
</filesmatch>
|
||||
|
||||
# 2 DAYS
|
||||
<filesmatch>
|
||||
ExpiresDefault A172800
|
||||
Header set Cache-Control "max-age=172800, must-revalidate"
|
||||
</filesmatch>
|
||||
|
||||
# 1 WEEK
|
||||
<filesmatch>
|
||||
ExpiresDefault A604800
|
||||
Header set Cache-Control "max-age=604800, must-revalidate"
|
||||
</filesmatch>
|
||||
|
||||
# 1 MONTH
|
||||
<filesmatch>
|
||||
ExpiresDefault A2419200
|
||||
Header set Cache-Control "max-age=2419200, must-revalidate"
|
||||
</filesmatch>
|
@ -0,0 +1,60 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# Mime Types
|
||||
# Mime Associates the requested filename's extensions with the file's behavior and content
|
||||
# http://httpd.apache.org/docs/2.0/mod/mod_mime.html
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
<ifmodule mod_mime.c="">
|
||||
AddType text/css .css
|
||||
AddType application/x-javascript .js
|
||||
AddType text/x-component .htc
|
||||
AddType text/html .html .htm
|
||||
AddType text/richtext .rtf .rtx
|
||||
AddType image/svg+xml .svg .svgz
|
||||
AddType text/plain .txt
|
||||
AddType text/xsd .xsd
|
||||
AddType text/xsl .xsl
|
||||
AddType text/xml .xml
|
||||
AddType video/asf .asf .asx .wax .wmv .wmx
|
||||
AddType video/avi .avi
|
||||
AddType image/bmp .bmp
|
||||
AddType application/java .class
|
||||
AddType video/divx .divx
|
||||
AddType application/msword .doc .docx
|
||||
AddType application/vnd.ms-fontobject .eot
|
||||
AddType application/x-msdownload .exe
|
||||
AddType image/gif .gif
|
||||
AddType application/x-gzip .gz .gzip
|
||||
AddType image/x-icon .ico
|
||||
AddType image/jpeg .jpg .jpeg .jpe
|
||||
AddType application/vnd.ms-access .mdb
|
||||
AddType audio/midi .mid .midi
|
||||
AddType video/quicktime .mov .qt
|
||||
AddType audio/mpeg .mp3 .m4a
|
||||
AddType video/mp4 .mp4 .m4v
|
||||
AddType video/ogg .ogv
|
||||
AddType video/mpeg .mpeg .mpg .mpe
|
||||
AddType application/vnd.ms-project .mpp
|
||||
AddType application/x-font-otf .otf
|
||||
AddType application/vnd.oasis.opendocument.database .odb
|
||||
AddType application/vnd.oasis.opendocument.chart .odc
|
||||
AddType application/vnd.oasis.opendocument.formula .odf
|
||||
AddType application/vnd.oasis.opendocument.graphics .odg
|
||||
AddType application/vnd.oasis.opendocument.presentation .odp
|
||||
AddType application/vnd.oasis.opendocument.spreadsheet .ods
|
||||
AddType application/vnd.oasis.opendocument.text .odt
|
||||
AddType audio/ogg .ogg
|
||||
AddType application/pdf .pdf
|
||||
AddType image/png .png
|
||||
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
|
||||
AddType audio/x-realaudio .ra .ram
|
||||
AddType application/x-shockwave-flash .swf
|
||||
AddType application/x-tar .tar
|
||||
AddType image/tiff .tif .tiff
|
||||
AddType application/x-font-ttf .ttf .ttc
|
||||
AddType audio/wav .wav
|
||||
AddType audio/wma .wma
|
||||
AddType application/vnd.ms-write .wri
|
||||
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
|
||||
AddType application/zip .zip
|
||||
</ifmodule>
|
@ -0,0 +1,18 @@
|
||||
# ----------------------------------------------------------------------
|
||||
# Start rewrite engine
|
||||
# Provides a rule-based rewriting engine to rewrite requested URLs on the fly
|
||||
# http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# FollowSymLinks must be enabled for this to work
|
||||
<ifmodule mod_rewrite.c="">
|
||||
Options +FollowSymlinks
|
||||
RewriteEngine On
|
||||
</ifmodule>
|
||||
|
||||
# Block access to "hidden" directories whose names begin with a period
|
||||
<ifmodule mod_rewrite.c="">
|
||||
RewriteCond %{SCRIPT_FILENAME} -d
|
||||
RewriteCond %{SCRIPT_FILENAME} -f
|
||||
RewriteRule "(^|/)\." - [F]
|
||||
</ifmodule>
|
31
wp-content/plugins/w3-total-cache/ini/apc.ini
Normal file
31
wp-content/plugins/w3-total-cache/ini/apc.ini
Normal file
@ -0,0 +1,31 @@
|
||||
; /etc/php.d/apc.ini
|
||||
|
||||
extension = apc.so
|
||||
|
||||
apc.enabled = 1
|
||||
apc.shm_segments = 1
|
||||
apc.shm_size = 32M
|
||||
apc.optimization = 0
|
||||
apc.num_files_hint = 4096
|
||||
apc.ttl = 7200
|
||||
apc.user_ttl = 7200
|
||||
apc.gc_ttl = 0
|
||||
apc.cache_by_default = 1
|
||||
apc.filters = ""
|
||||
apc.mmap_file_mask = "/tmp/apc.XXXXXX"
|
||||
apc.slam_defense = 0
|
||||
apc.file_update_protection = 2
|
||||
apc.enable_cli = 0
|
||||
apc.max_file_size = 10M
|
||||
apc.stat = 0
|
||||
apc.write_lock = 1
|
||||
apc.report_autofilter = 0
|
||||
apc.include_once_override = 0
|
||||
;apc.rfc1867 = 0
|
||||
;apc.rfc1867_prefix = "upload_"
|
||||
;apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
|
||||
;apc.rfc1867_freq = 0
|
||||
apc.localcache = 0
|
||||
apc.localcache.size = 2048
|
||||
apc.coredump_unmap = 0
|
||||
apc.stat_ctime = 0
|
39
wp-content/plugins/w3-total-cache/ini/config-db-sample.php
Normal file
39
wp-content/plugins/w3-total-cache/ini/config-db-sample.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* File: config-db-sample.php
|
||||
*
|
||||
* @package W3TC
|
||||
*/
|
||||
|
||||
define( 'W3TC_CONFIG_DATABASE', true );
|
||||
|
||||
// optional - specify table to store.
|
||||
define( 'W3TC_CONFIG_DATABASE_TABLE', 'wp_options' );
|
||||
|
||||
// cache config in cache to prevent db queries on each http request.
|
||||
// if multiple http servers used - use only shared cache storage used by all
|
||||
// machines, since distributed flush operations are not supported for config
|
||||
// cache.
|
||||
|
||||
// memcached cache config.
|
||||
define( 'W3TC_CONFIG_CACHE_ENGINE', 'memcached' );
|
||||
define( 'W3TC_CONFIG_CACHE_MEMCACHED_SERVERS', '127.0.0.1:11211' );
|
||||
|
||||
// optional memcached settings.
|
||||
define( 'W3TC_CONFIG_CACHE_MEMCACHED_PERSISTENT', true );
|
||||
define( 'W3TC_CONFIG_CACHE_MEMCACHED_AWS_AUTODISCOVERY', false );
|
||||
define( 'W3TC_CONFIG_CACHE_MEMCACHED_USERNAME', '' );
|
||||
define( 'W3TC_CONFIG_CACHE_MEMCACHED_PASSWORD', '' );
|
||||
|
||||
// redis config cache.
|
||||
define( 'W3TC_CONFIG_CACHE_ENGINE', 'redis' );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_SERVERS', '127.0.0.1:6379' );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_VERIFY_TLS_CERTIFICATES', true );
|
||||
|
||||
// optional redis settings.
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_PERSISTENT', true );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_DBID', 0 );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_PASSWORD', '' );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_TIMEOUT', 0 );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_RETRY_INTERVAL', 0 );
|
||||
define( 'W3TC_CONFIG_CACHE_REDIS_READ_TIMEOUT', 0 );
|
@ -0,0 +1,208 @@
|
||||
<?php
|
||||
|
||||
global $w3tc_dbcluster_config;
|
||||
|
||||
$w3tc_dbcluster_config = array(
|
||||
/**
|
||||
* Persistent (bool)
|
||||
*
|
||||
* This determines whether to use mysql_connect or mysql_pconnect. The effects
|
||||
* of this setting may vary and should be carefully tested.
|
||||
* Default: false
|
||||
*/
|
||||
'persistent' => false,
|
||||
|
||||
/**
|
||||
* check_tcp_responsiveness
|
||||
*
|
||||
* Enables checking TCP responsiveness by fsockopen prior to mysql_connect or
|
||||
* mysql_pconnect. This was added because PHP's mysql functions do not provide
|
||||
* a variable timeout setting. Disabling it may improve average performance by
|
||||
* a very tiny margin but lose protection against connections failing slowly.
|
||||
* Default: true
|
||||
*/
|
||||
'check_tcp_responsiveness' => true,
|
||||
|
||||
/**
|
||||
* Default is to always (reads & writes) use the master db when user is in administration backend.
|
||||
* Set use_master_in_backend to false to disable this behavior.
|
||||
*
|
||||
* WARNING: if your cluster has any replication delays then when this is enabled, you may not see
|
||||
* any admin changes until the replication catches up with the change written to your master
|
||||
* server and will see old content/configuration until that point in time - You should test this
|
||||
* in your environment fully.
|
||||
*/
|
||||
'use_master_in_backend' => true,
|
||||
|
||||
/**
|
||||
* This set the charset that the db connection should use.
|
||||
* If DB_CHARSET is set there is no need to set $wpdb_cluster->charset.
|
||||
*/
|
||||
'charset' => DB_CHARSET,
|
||||
|
||||
/**
|
||||
* This set the charset that the db connection should use.
|
||||
* If DB_COLLATE is set there is no need to set $wpdb_cluster->collate.
|
||||
*/
|
||||
'collate' => DB_COLLATE,
|
||||
/** Configuration Functions **/
|
||||
|
||||
/**
|
||||
* database is an associative array with these parameters:
|
||||
* host (required) Hostname with optional :port. Default port is 3306.
|
||||
* user (required) MySQL user name.
|
||||
* password (required) MySQL user password.
|
||||
* name (required) MySQL database name.
|
||||
* read (optional) Whether server is readable. Default is 1 (readable).
|
||||
* Also used to assign preference.
|
||||
* write (optional) Whether server is writable. Default is 1 (writable).
|
||||
* Also used to assign preference in multi-master mode.
|
||||
* dataset (optional) Name of dataset. Default is 'global'.
|
||||
* timeout (optional) Seconds to wait for TCP responsiveness. Default is 0.2
|
||||
* connect_function (optional) connection function to use
|
||||
* zone (optional) name of zone where server is located.
|
||||
* Used for web applications hosted on cluster
|
||||
*
|
||||
* Read & write
|
||||
* A database definition can include 'read' and 'write' parameters. These
|
||||
* operate as boolean switches but they are typically specified as integers.
|
||||
* They allow or disallow use of the database for reading or writing.
|
||||
*
|
||||
* A master database might be configured to allow reading and writing:
|
||||
* 'write' => true,
|
||||
* 'read' => true,
|
||||
* while a slave would be allowed only to read:
|
||||
* 'write' => false,
|
||||
* 'read' => true,
|
||||
*
|
||||
* It might be advantageous to disallow reading from the master, such as when
|
||||
* there are many slaves available and the master is very busy with writes.
|
||||
* 'write' => true,
|
||||
* 'read' => false,
|
||||
*
|
||||
*/
|
||||
'databases' => array(
|
||||
'master' => array(
|
||||
'host' => DB_HOST, // If port is other than 3306, use host:port.
|
||||
'user' => DB_USER,
|
||||
'password' => DB_PASSWORD,
|
||||
'name' => DB_NAME
|
||||
)
|
||||
),
|
||||
|
||||
/**
|
||||
* Zones (for web applications hosted on cluster)
|
||||
*
|
||||
* When your databases are located in separate physical locations there is
|
||||
* typically an advantage to connecting to a nearby server instead of a more
|
||||
* distant one. This can be configured by defining zones.
|
||||
*
|
||||
* Add 'zone' parameter to add_server call:
|
||||
* 'zone' => 'A'
|
||||
*
|
||||
* Plugin determines where application is running by checking
|
||||
* $_SERVER['SERVER_NAME'] system variable against defined in zone definition
|
||||
* and then connects to servers following defined order:
|
||||
* Value '*' can be used as 'server_names' item to indicate any server.
|
||||
*
|
||||
* 'zones' => array(
|
||||
* 'zone_name' => array(
|
||||
* 'server_names' => array('host1', 'host1.1'),
|
||||
* 'zone_priorities' => array('A', 'B')
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* As a result it will try to connect to servers in zone A first, then servers
|
||||
* in zone B.
|
||||
*/
|
||||
'zones' => array(
|
||||
),
|
||||
|
||||
/**
|
||||
* Filters
|
||||
*
|
||||
* Filters are executed on <tag> event in the order in which they are
|
||||
* registered until one of them returns something other than null.
|
||||
*
|
||||
* Tags:
|
||||
* 'dataset' - fitler will be called with two arguments and expected to
|
||||
* return a dataset to connect to
|
||||
* $dataset = $callback($table, &$wpdb);
|
||||
* 'blog_dataset' - fitler will be called with argument $blog_id and
|
||||
* expected to return a dataset to connect to.
|
||||
* Used when data are partitioned at blog level
|
||||
* $dataset = $callback($blog_id);
|
||||
*
|
||||
* 'filters' => array(
|
||||
* array(
|
||||
* 'tag' => 'tag_to_add',
|
||||
* 'function_to_add' => 'function_name'
|
||||
|
||||
* );
|
||||
*/
|
||||
'filters' => array(
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This adds the same server again, only this time it is configured as a slave.
|
||||
* The last three parameters are set to the defaults but are shown for clarity.
|
||||
*/
|
||||
/*
|
||||
$w3tc_dbcluster_config = array(
|
||||
'databases' => array(
|
||||
'master' => array(
|
||||
'host' => DB_HOST,
|
||||
'user' => DB_USER,
|
||||
'password' => DB_PASSWORD,
|
||||
'name' => DB_NAME
|
||||
),
|
||||
'slave' => array(
|
||||
'host' => DB_HOST,
|
||||
'user' => DB_USER,
|
||||
'password' => DB_PASSWORD,
|
||||
'name' => DB_NAME,
|
||||
'write' => false,
|
||||
'read' => true,
|
||||
'timeout' => 0.2,
|
||||
));
|
||||
*/
|
||||
|
||||
/** Sample Configuration 2: Partitioning **/
|
||||
|
||||
/**
|
||||
* This example shows a setup where the multisite blog tables have been
|
||||
* separated from the global dataset.
|
||||
*/
|
||||
/*
|
||||
$w3tc_dbcluster_config = array(
|
||||
'databases' => array(
|
||||
'master' => array(
|
||||
'host' => 'global.db.example.com',
|
||||
'user' => 'globaluser',
|
||||
'password' => 'globalpassword',
|
||||
'name' => 'globaldb',
|
||||
),
|
||||
'partition2' => array(
|
||||
'host' => 'blog.db.example.com',
|
||||
'user' => 'bloguser',
|
||||
'password' => 'blogpassword',
|
||||
'name' => 'blogdb',
|
||||
'dataset' => 'blog2',
|
||||
),
|
||||
)
|
||||
'filters' => array(
|
||||
array(
|
||||
'tag' => 'blog_dataset',
|
||||
'function_to_add' => 'my_db_callback'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
function my_db_callback($blog_id, $wpdb_cluster) {
|
||||
if ($blog_id > 5))
|
||||
return 'blog2';
|
||||
}
|
||||
*/
|
26
wp-content/plugins/w3-total-cache/ini/eaccelerator.ini
Normal file
26
wp-content/plugins/w3-total-cache/ini/eaccelerator.ini
Normal file
@ -0,0 +1,26 @@
|
||||
; /etc/php.d/eaccelerator.ini
|
||||
|
||||
;extension = eaccelerator.so
|
||||
zend_extension = "/usr/lib/php/modules/eaccelerator.so"
|
||||
zend_extension_ts = "/usr/lib/php/modules/eaccelerator.so"
|
||||
|
||||
eaccelerator.shm_size = 32
|
||||
;eaccelerator.cache_dir = "/tmp/eaccelerator"
|
||||
eaccelerator.enable = 1
|
||||
eaccelerator.optimizer = 0
|
||||
eaccelerator.debug = 0
|
||||
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
|
||||
eaccelerator.name_space = ""
|
||||
eaccelerator.check_mtime = 1
|
||||
eaccelerator.filter = ""
|
||||
eaccelerator.shm_max = 0
|
||||
eaccelerator.shm_ttl = 7200
|
||||
eaccelerator.shm_prune_period = 7200
|
||||
eaccelerator.shm_only = 1
|
||||
eaccelerator.compress = 0
|
||||
eaccelerator.compress_level = 9
|
||||
eaccelerator.keys = shm
|
||||
eaccelerator.sessions = shm
|
||||
eaccelerator.content = shm
|
||||
; Insert path to document root below, then uncomment the line
|
||||
;eaccelerator.allowed_admin_path = "/var/www/domain.com/"
|
0
wp-content/plugins/w3-total-cache/ini/index.html
Normal file
0
wp-content/plugins/w3-total-cache/ini/index.html
Normal file
10
wp-content/plugins/w3-total-cache/ini/memcache.ini
Normal file
10
wp-content/plugins/w3-total-cache/ini/memcache.ini
Normal file
@ -0,0 +1,10 @@
|
||||
; /etc/php.d/memcache.ini
|
||||
|
||||
extension = memcache.so
|
||||
|
||||
memcache.allow_failover = 1
|
||||
memcache.max_failover_attempts = 20
|
||||
memcache.chunk_size = 32768
|
||||
memcache.default_port = 11211
|
||||
memcache.hash_strategy = standard
|
||||
memcache.hash_function = crc32
|
@ -0,0 +1,31 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name yoursite.com;
|
||||
access_log /var/log/nginx/yoursite.com_access.log;
|
||||
error_log /var/log/nginx/yoursite.com_error.log debug;
|
||||
|
||||
root /var/www/vhosts/yoursite.com;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^/(blog1|blog2)/(wp-(content|admin|includes).*) /$2;
|
||||
rewrite ^/(blog1|blog2)/(.*.php)$ /$2;
|
||||
}
|
||||
|
||||
include /var/www/vhosts/yoursite.com/nginx.conf;
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite (.*) /index.php last;
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name yoursite.com;
|
||||
access_log /var/log/nginx/yoursite.com_access.log;
|
||||
error_log /var/log/nginx/yoursite.com_error.log debug;
|
||||
|
||||
root /var/www/vhosts/yoursite.com;
|
||||
index index.php;
|
||||
|
||||
include /var/www/vhosts/yoursite.com/nginx.conf;
|
||||
|
||||
if (!-e $request_filename) {
|
||||
rewrite (.*) /index.php last;
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
fastcgi_index index.php;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
9
wp-content/plugins/w3-total-cache/ini/opcache.ini
Normal file
9
wp-content/plugins/w3-total-cache/ini/opcache.ini
Normal file
@ -0,0 +1,9 @@
|
||||
; /etc/php.d/apc.ini
|
||||
|
||||
zend_extension=opcache.so
|
||||
|
||||
opcache.enable = 1
|
||||
opcache.fast_shutdown = 1
|
||||
opcache.enable_file_override = 1
|
||||
opcache.validate_timestamps = 0
|
||||
opcache.max_file_size = 10000000
|
4
wp-content/plugins/w3-total-cache/ini/php.append.ini
Normal file
4
wp-content/plugins/w3-total-cache/ini/php.append.ini
Normal file
@ -0,0 +1,4 @@
|
||||
; Use memcache as a session handler
|
||||
session.save_handler = memcache
|
||||
; Use a comma separated list of server urls to use for storage:
|
||||
session.save_path = "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
|
23
wp-content/plugins/w3-total-cache/ini/s3-sample-policy.txt
Normal file
23
wp-content/plugins/w3-total-cache/ini/s3-sample-policy.txt
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "Stmt1339423675421",
|
||||
"Action": [
|
||||
"s3:DeleteObject",
|
||||
"s3:Get*",
|
||||
"s3:Put*",
|
||||
"s3:Set*"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": [
|
||||
"arn:aws:s3:::bucketnamehere/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Sid": "Stmt1339423675422",
|
||||
"Action":s3:List*?,
|
||||
"Effect":"Allow",
|
||||
"Resource":"*"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
backend default {
|
||||
.host = "127.0.0.1";
|
||||
.port = "8080";
|
||||
}
|
||||
|
||||
acl purge {
|
||||
# Web server with plugin which will issue PURGE requests
|
||||
"localhost";
|
||||
}
|
||||
|
||||
sub vcl_recv {
|
||||
if (req.request == "PURGE") {
|
||||
if (!client.ip ~ purge) {
|
||||
error 405 "Not allowed.";
|
||||
}
|
||||
ban("req.url ~ ^" + req.url + "$ && req.http.host == " + req.http.host);
|
||||
}
|
||||
|
||||
# Normalize content-encoding
|
||||
if (req.http.Accept-Encoding) {
|
||||
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|lzma|tbz)(\?.*|)$") {
|
||||
remove req.http.Accept-Encoding;
|
||||
} elsif (req.http.Accept-Encoding ~ "gzip") {
|
||||
set req.http.Accept-Encoding = "gzip";
|
||||
} elsif (req.http.Accept-Encoding ~ "deflate") {
|
||||
set req.http.Accept-Encoding = "deflate";
|
||||
} else {
|
||||
remove req.http.Accept-Encoding;
|
||||
}
|
||||
}
|
||||
|
||||
# Remove cookies and query string for real static files
|
||||
if (req.url ~ "\.(bz2|css|flv|gif|gz|ico|jpeg|jpg|js|lzma|mp3|mp4|pdf|png|swf|tbz|tgz|txt|zip)(\?.*|)$") {
|
||||
unset req.http.cookie;
|
||||
set req.url = regsub(req.url, "\?.*$", "");
|
||||
}
|
||||
|
||||
if (req.url ~ "wp-(login|admin|comments-post.php|cron.php)" ||
|
||||
req.url ~ "preview=true" ||
|
||||
req.url ~ "xmlrpc.php") {
|
||||
return (pass);
|
||||
}
|
||||
|
||||
return (lookup);
|
||||
}
|
||||
|
||||
sub vcl_fetch {
|
||||
# Don't cache backend
|
||||
if (req.url ~ "wp-(login|admin|comments-post.php|cron.php)" ||
|
||||
req.url ~ "preview=true" ||
|
||||
req.url ~ "xmlrpc.php") {
|
||||
# Dont modify anything, it's (pass) object
|
||||
} else {
|
||||
unset beresp.http.set-cookie;
|
||||
|
||||
if (beresp.status == 307) {
|
||||
# Don't cache temporary redirects like ?repeat=w3tc
|
||||
set beresp.ttl = 0h;
|
||||
} else if (req.url ~ "\.(bz2|css|flv|gif|gz|ico|jpeg|jpg|js|lzma|mp3|mp4|pdf|png|swf|tbz|tgz|txt|zip)$") {
|
||||
set beresp.ttl = 30d;
|
||||
} else {
|
||||
set beresp.ttl = 4h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_hit {
|
||||
if (req.request == "PURGE") {
|
||||
purge;
|
||||
error 200 "Purged.";
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_miss {
|
||||
if (req.request == "PURGE") {
|
||||
purge;
|
||||
error 200 "Purged.";
|
||||
}
|
||||
}
|
61
wp-content/plugins/w3-total-cache/ini/web.config
Normal file
61
wp-content/plugins/w3-total-cache/ini/web.config
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<!-- http website -->
|
||||
<rule name="w3tc_pagecache" stopProcessing="true">
|
||||
<match url="(.*)" />
|
||||
<conditions logicalGrouping="MatchAll">
|
||||
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
|
||||
<add input="{QUERY_STRING}" pattern=".*=.*" negate="true" />
|
||||
<add input="{HTTP_COOKIE}" pattern="^.*(comment_author_|wordpress|wp-postpass_).*$" negate="true" />
|
||||
<add input="{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/{HTTP_HOST}/{R:1}_index.html"
|
||||
matchType="IsFile" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="wp-content/cache/page_enhanced/{HTTP_HOST}/{R:1}_index.html" />
|
||||
</rule>
|
||||
<!-- https website -->
|
||||
<rule name="w3tc_pagecache_ssl" stopProcessing="true">
|
||||
<match url="(.*)" />
|
||||
<conditions logicalGrouping="MatchAll">
|
||||
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
|
||||
<add input="{QUERY_STRING}" pattern=".*=.*" negate="true" />
|
||||
<add input="{HTTP_COOKIE}" pattern="^.*(comment_author_|wordpress|wp-postpass_).*$" negate="true" />
|
||||
<add input="{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/{HTTP_HOST}/{R:1}_index_ssl.html"
|
||||
matchType="IsFile" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="wp-content/cache/page_enhanced/{HTTP_HOST}/{R:1}_index_ssl.html" />
|
||||
</rule>
|
||||
<!-- minify, disk engine -->
|
||||
<rule name="w3tc_rewrite_test" stopProcessing="true">
|
||||
<match url="/wp-content/cache/minify/w3tc_rewrite_test" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
<rule name="w3tc-minify-file" stopProcessing="true">
|
||||
<match url="/wp-content/cache/minify/(.+\.(css|js))$" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
<rule name="WordPress" patternSyntax="Wildcard">
|
||||
<match url="*"/>
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php"/>
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
<!-- leverage browser cache -->
|
||||
<staticContent>
|
||||
<clientCache cacheControlMaxAge="30.00:00:00" cacheControlMode="UseMaxAge"/>
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
</configuration>
|
35
wp-content/plugins/w3-total-cache/ini/xcache.ini
Normal file
35
wp-content/plugins/w3-total-cache/ini/xcache.ini
Normal file
@ -0,0 +1,35 @@
|
||||
; /etc/php.d/xcache.ini
|
||||
|
||||
;extension = xcache.so
|
||||
zend_extension = "/usr/lib/php/modules/xcache.so"
|
||||
zend_extension_ts = "/usr/lib/php/modules/xcache.so"
|
||||
|
||||
xcache.admin.user = ""
|
||||
xcache.admin.pass = ""
|
||||
xcache.admin.enable_auth = Off
|
||||
xcache.test = Off
|
||||
xcache.coredump_directory = ""
|
||||
|
||||
xcache.shm_scheme = mmap
|
||||
|
||||
xcache.cacher = On
|
||||
xcache.size = 32M
|
||||
xcache.count = 8
|
||||
xcache.slots = 8K
|
||||
xcache.ttl = 0
|
||||
xcache.gc_interval = 0
|
||||
xcache.var_size = 32M
|
||||
xcache.var_count = 1
|
||||
xcache.var_slots = 8K
|
||||
xcache.var_ttl = 0
|
||||
xcache.var_maxttl = 0
|
||||
xcache.var_gc_interval = 300
|
||||
xcache.mmap_path = "/dev/zero"
|
||||
|
||||
xcache.optimizer = Off
|
||||
|
||||
xcache.coverager = Off
|
||||
xcache.coveragedump_directory = ""
|
||||
|
||||
xcache.stat = Off
|
||||
xcache.readonly_protection = Off
|
Reference in New Issue
Block a user