Last active
September 5, 2021 23:34
-
-
Save croxton/d2294e9413ed3c4ebde1 to your computer and use it in GitHub Desktop.
Revisions
-
croxton revised this gist
Jan 22, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -149,7 +149,7 @@ PHP 5.5 has opcode caching built in, but it is disabled by default. Edit `/usr/l zend_extension=opcache.so [opcache] opcache.enable=1 opcache.enable_cli=0 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 -
croxton revised this gist
Sep 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ If you want to handle 100+ concurrent users with the same modest hardware see th ### PHP 5.5.13 Since we're using [mod_ruid2](https://documentation.cpanel.net/display/EA/Apache+Module:+ModRuid2) we're using DSO as the PHP handler. My load testing shows it's faster and more stable than the only other sensible option on cPanel (FCGI), but YMMV. When cPanel finally adds PHP-FPM to EasyApache, use that (do NOT be tempted to go the DIY route). Tick the `Silence Deprecated Patch` if you are running EE < 2.8, since a few things throw deprecated notices in PHP 5.5. * Bcmath * CGI -
croxton revised this gist
Jan 8, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -112,7 +112,7 @@ Edit `/etc/my.cnf` query-cache-type = 1 query-cache-size = 80M query-cache-limit = 256K query-cache-min-res-unit = 2048 max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 -
croxton revised this gist
Jan 8, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -112,7 +112,7 @@ Edit `/etc/my.cnf` query-cache-type = 1 query-cache-size = 80M query-cache-limit = 256K query-cache-min-res-unit = 2K max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 -
croxton revised this gist
Jan 8, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -112,7 +112,7 @@ Edit `/etc/my.cnf` query-cache-type = 1 query-cache-size = 80M query-cache-limit = 256K query-cache-min-res-unit = 2k max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 -
croxton revised this gist
Jan 8, 2015 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -110,8 +110,9 @@ Edit `/etc/my.cnf` tmp-table-size = 64M max-heap-table-size = 64M query-cache-type = 1 query-cache-size = 80M query-cache-limit = 256K query-cache-min-res-unit = 2k max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ "Medium traffic" = able to handle around 50 concurrent users on average. If you want to handle 100+ concurrent users with the same modest hardware see the [Varnish](https://gist.github.com/croxton/d2294e9413ed3c4ebde1#varnish) section below. -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ "Medium traffic" = able to handle around 50 concurrent users on average and burst up to 100 without causing your server to thrash. If you want to handle 100+ concurrent users with the same modest hardware see the [Varnish](https://gist.github.com/croxton/d2294e9413ed3c4ebde1#varnish) section below. ### VPS -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -88,7 +88,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A ### My.cnf config for MySQL 5.6 The following configuration is optimised for running EE websites **with a mix of MySIAM and InnoDB tables**. Uncomment sql-mode if you want to run MySQL in strict mode (some add-ons won't like it). Note that setting `performance_schema = 0` is esential for production sites, as this can use significant amounts of memory. Edit `/etc/my.cnf` -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -88,7 +88,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A ### My.cnf config for MySQL 5.6 The following configuration is optimised for running EE websites *with a mix of MySIAM and InnoDB tables*. Uncomment sql-mode if you want to run MySQL in strict mode (some add-ons won't like it). Note that setting `performance_schema = 0` is esential for production sites, as this can use significant amounts of memory. Edit `/etc/my.cnf` -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A - should be same as min spare servers **Server Limit** 65 - Assuming MySQL uses between 0.5 - 1GB (as it will if you use the config below), Linux and other services are using around 0.4GB, so you have between 2.6GB-3.1GB to allocate to Apache. If your httpd processes typically use around 40MB per process (normal for EE) then being conservative: 65x40MB = 2600MB (~2.54GB) - Don't rely on the Template Debugger to tell you how much a typical Apache process uses - run `top` in your terminal while your site is under load. -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A - should be same as min spare servers **Server Limit** 65 - Assuming MySQL uses between 0.5 - 1GB, Linux and other services are using around 0.4GB, so you have between 2.6GB-3.1GB to allocate to Apache. If your httpd processes typically use around 40MB per process (normal for EE) then being conservative: 65x40MB = 2600MB (~2.54GB) - Don't rely on the Template Debugger to tell you how much a typical Apache process uses - run `top` in your terminal while your site is under load. -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A - should be same as min spare servers **Server Limit** 65 - Assuming MySQL uses between 0.5 - 1GB, Linux and other services are using around 0.4GB, so you have between 2.6GB-3.1GB to allocate to Apache. If your httpd processes typically use around 40Mb per process (normal for EE) then being conservative: 65x40Mb = 2600Mb (~2.54GB) - Don't rely on the Template Debugger to tell you how much a typical Apache process uses - run `top` in your terminal while your site is under load. -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -175,7 +175,7 @@ When you're done login to WHM and find the new Varnish control panel. On the advanced configuration page: * Set Cache time to Live to 600 seconds (go higher if you have a lot of content that doesn't change frequently). * Set Memory Cache to 250M (can go up to 2G, depends on how big site is and how much is cached). * Add these URLs using the 'URL opt-out' field: `admin\.php` and `ACT=`. (Add any other URLs you want to exclude from caching, e.g. 'system' if you still have that in your webroot). -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -175,7 +175,7 @@ When you're done login to WHM and find the new Varnish control panel. On the advanced configuration page: * Set Cache time to Live to 600 seconds. * Set Memory Cache to 250M (can go up to 2G, depends on how big site is and how much is cached). * Add these URLs using the 'URL opt-out' field: `admin\.php` and `ACT=`. (Add any other URLs you want to exclude from caching, e.g. 'system' if you still have that in your webroot). -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -88,7 +88,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A ### My.cnf config for MySQL 5.6 The following configuration is optimised for running EE websites with a mix of MySIAM and InnoDB tables. Uncomment sql-mode if you want to run MySQL in strict mode (some add-ons won't like it). Note that setting `performance_schema = 0` is esential for production sites, as this can use significant amounts of memory. Edit `/etc/my.cnf` -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -77,6 +77,7 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A **Keep-Alive** Off - You may want to turn on Keep Alives, but if you do use low limits: **Keep-Alive Timeout** 1 **Max Keep-Alive Requests** 50 -
croxton revised this gist
Jan 6, 2015 . 1 changed file with 11 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -62,26 +62,29 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A **Start Servers** 3 - should be same as min spare servers **Server Limit** 65 - Assuming MySQL uses between 0.5 - 1Gb, Linux and other services are using around 0.4Gb, so you have between 2.6Gb-3.1Gb to allocate to Apache. If your httpd processes typically use around 40Mb per process (normal for EE) then being conservative: 65x40Mb = 2600Mb. - Don't rely on the Template Debugger to tell you how much a typical Apache process uses - run `top` in your terminal while your site is under load. **Max Request Workers** 65 - Same as server limit **Max Connections Per Child** 3250 - Should be at between 10x - 50x the max request workers. - Higher means more chance of memory leaks from poorly coded PHP scripts (bad) but fewer new processes (good), so experiment. **Keep-Alive** Off - You may want to turn on Keep Alives, but if you do use low limits: **Keep-Alive Timeout** 1 **Max Keep-Alive Requests** 50 - See: http://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html - Also: http://www.reddit.com/r/webdev/comments/1bs4t0/3_small_tweaks_to_make_apache_fly/ **Time Out** 120 ### My.cnf config for MySQL 5.6 The following configuration is optimised for running EE websites with a mix of MySIAM and InnoDB tables. Uncomment sql-mode if you want to run MySQL in strict mode (some add-ons won't like it). -
croxton revised this gist
Jan 5, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -62,14 +62,14 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A **Start Servers** 3 - should be same as min spare servers **Server Limit** 75 - No more than 75% of available ram. If your webpages typically uses 40Mb per process then 75x40Mb = 3000Mb of ram used. Don't rely on the Template Debugger to tell you how much a typical Apache process uses - run `top` in your terminal while your site is under load. **Max Request Workers** 75 - Same as server limit **Max Connections Per Child** 3750 - Should be at between 10x - 50x the max request workers. - Higher means more chance of memory leaks from poorly coded PHP scripts (bad) but fewer new processes (good), so experiment. **Keep-Alive** On -
croxton revised this gist
Jan 5, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -100,6 +100,7 @@ Edit `/etc/my.cnf` innodb = FORCE innodb-strict-mode = 1 myisam-recover = FORCE,BACKUP performance_schema = 0 # CACHES AND LIMITS # tmp-table-size = 64M -
croxton revised this gist
Jan 5, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -102,10 +102,10 @@ Edit `/etc/my.cnf` myisam-recover = FORCE,BACKUP # CACHES AND LIMITS # tmp-table-size = 64M max-heap-table-size = 64M query-cache-type = 1 query-cache-size = 128M query-cache-limit = 2M max-connections = 500 thread-cache-size = 50 @@ -123,7 +123,7 @@ Edit `/etc/my.cnf` innodb-buffer-pool-size = 512M # MyISAM # key-buffer-size = 256M # LOGGING # log-error = /var/lib/mysql/mysql-error.log -
croxton revised this gist
Jun 20, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -82,11 +82,11 @@ Since we're using [mod_ruid2](http://docs.cpanel.net/twiki/bin/view/EasyApache/A **Time Out** 120 ### My.cnf config for MySQL 5.6 The following configuration is optimised for running EE websites with a mix of MySIAM and InnoDB tables. Uncomment sql-mode if you want to run MySQL in strict mode (some add-ons won't like it). Edit `/etc/my.cnf` [mysqld] -
croxton revised this gist
Jun 20, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -120,10 +120,10 @@ Optimised for running EE websites with a mix of MySIAM and InnoDB tables. Uncomm innodb_additional_mem_pool_size = 20M innodb-flush-log-at-trx-commit = 2 innodb-file-per-table = 1 innodb-buffer-pool-size = 512M # MyISAM # key-buffer-size = 512M # LOGGING # log-error = /var/lib/mysql/mysql-error.log -
croxton revised this gist
Jun 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ "Medium traffic" = able to handle around 50 concurrent users on average and burst up to 100-150 without causing your server to thrash. If you want to handle 500+ concurrent users with the same modest hardware see the [Varnish](https://gist.github.com/croxton/d2294e9413ed3c4ebde1#varnish) section below. ### VPS -
croxton revised this gist
Jun 5, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -174,7 +174,11 @@ On the advanced configuration page: * Set Memory Cache to 250M (can go up to 2G, depends on how big site is and how much is cached). * Add these URLs using the 'URL opt-out' field: `admin\.php` and `ACT=`. (Add any other URLs you want to exclude from caching, e.g. 'system' if you still have that in your webroot). Now you need to customize `/etc/varnish/default.vcl`. The code below is adapted from Unixy's config and [this article](http://ellislab.com/blog/entry/making-sites-fly-with-varnish) by Kevin Cupp. It enables the Mustash Varnish plugin or Kevin's Purge extension to purge the Varnish cache when cache-breaking rules are triggered. With Mustash, Varnish cache-breaking is granular: when Stash full page caches are cleared in the CP or cache-breaking is triggered by rules, the corresponding Varnish cache object will be cleared. Refer to the article if you want to make further changes to the vcl config such as enabling Edge Side Includes. Note: If you have set a custom `cookie_prefix` in your site config, change `exp_sessionid` to `your_prefix_sessionid`. Restart Varnish (from WHM control panel) after editing `default.vcl`. @@ -388,7 +392,7 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. set resp.http.X-Cache = "MISS"; } # cache object url set resp.http.X-Url = req.url; } -
croxton revised this gist
Jun 5, 2014 . 1 changed file with 20 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -182,8 +182,6 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. # Copyright (c) UNIXY - http://www.unixy.net # # The leading truly fully managed server provider # ################################################### include "/etc/varnish/cpanel.backend.vcl"; @@ -263,16 +261,22 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. # Purge if (req.request == "PURGE") { if (!client.ip ~ acl127_0_0_1) {error 405 "Not permitted";} return (lookup); } # Clear the cache for an entire domain if (req.request == "EE_PURGE") { ban("req.url ~ ^/.*$ && req.http.host == "+req.http.host); error 200 "Purged"; } # Clear any cached object that matches the exact req.url if (req.request == "EE_PURGE_URL") { ban("req.url == "+req.url+" && req.http.host == "+req.http.host); error 200 "Purged"; } ## Default request checks if (req.request != "GET" && req.request != "HEAD" && @@ -284,10 +288,16 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. return (pipe); } # Don't cache dynamic content if (req.request != "GET" && req.request != "HEAD") { return (pass); } # Don't cache content for logged in users if (req.http.Cookie ~ "exp_sessionid") { return (pass); } ## Modified from default to allow caching if cookies are set, but not http auth if (req.http.Authorization) { return (pass); @@ -377,6 +387,9 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. else { set resp.http.X-Cache = "MISS"; } # test set resp.http.X-Url = req.url; } @@ -434,3 +447,4 @@ Restart Varnish (from WHM control panel) after editing `default.vcl`. -
croxton revised this gist
Jun 4, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ "Medium traffic" = able to handle around 50 concurrent users on average and burst up to 100-150 without causing your server to thrash. If you want to handle far, far more traffic with the same modest hardware see the [Varnish](https://gist.github.com/croxton/d2294e9413ed3c4ebde1#varnish) section below. ### VPS -
croxton revised this gist
Jun 4, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ "Medium traffic" = able to handle around 50 concurrent users on average and burst up to 100-150 without causing your server to thrash. If you want to handle far more with the same modest hardware see the [Varnish](https://gist.github.com/croxton/d2294e9413ed3c4ebde1#varnish) section below. ### VPS -
croxton revised this gist
Jun 4, 2014 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -168,7 +168,7 @@ Once you have downloaded the zip from Unixy, upload it to /usr/src. Then SSH int When you're done login to WHM and find the new Varnish control panel. On the advanced configuration page: * Set Cache time to Live to 60 seconds (go higher if you dare or have heavy traffic). * Set Memory Cache to 250M (can go up to 2G, depends on how big site is and how much is cached). @@ -178,6 +178,13 @@ Now you need to customize `/etc/varnish/default.vcl`. The code below is adapted Restart Varnish (from WHM control panel) after editing `default.vcl`. ################################################### # Copyright (c) UNIXY - http://www.unixy.net # # The leading truly fully managed server provider # ################################################### # Adapted for ExpressionEngine include "/etc/varnish/cpanel.backend.vcl"; include "/etc/varnish/backends.vcl"; -
croxton revised this gist
Jun 4, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -174,7 +174,9 @@ On the advanaced configuration page: * Set Memory Cache to 250M (can go up to 2G, depends on how big site is and how much is cached). * Add these URLs using the 'URL opt-out' field: `admin\.php` and `ACT=`. (Add any other URLs you want to exclude from caching, e.g. 'system' if you still have that in your webroot). Now you need to customize `/etc/varnish/default.vcl`. The code below is adapted from Unixy's config and [this article](http://ellislab.com/blog/entry/making-sites-fly-with-varnish) by Kevin Cupp. It enables the Mustash Varnish plugin or Kevin's own Purge extension to purge the Varnish cache when cache-breaking rules are triggered. Note also that Purging is only enabled for one domain (replace `example.com` with your domain). Refer to the article if you want to make further changes to the vcl config such as enabling Edge Side Includes. Restart Varnish (from WHM control panel) after editing `default.vcl`. include "/etc/varnish/cpanel.backend.vcl";
NewerOlder