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 characters
| # Enable pagespeed module by putting the following in http context | |
| pagespeed on; | |
| pagespeed Domain example.com; | |
| pagespeed DownstreamCachePurgeLocationPrefix http://lb1.i; | |
| pagespeed DownstreamCachePurgeMethod PURGE; | |
| pagespeed DownstreamCacheRewrittenPercentageThreshold 95; | |
| # This setting should be enabled when using HTTPS |
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 characters
| --- | |
| # The paths in which to look for gems | |
| # :gempath: | |
| # Force specification of gem server host on push | |
| # disable_default_gem_server: | |
| # A YAML array of remote gem repositories to install gems from | |
| # :sources: |
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 characters
| * soft nofile 20000000 | |
| * hard nofile 20000000 | |
| * soft nproc 8192 | |
| * hard nproc 8192 |
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 characters
| bash <(curl -f -L -sS https://ngxpagespeed.com/install) \ | |
| --nginx-version latest \ | |
| --additional-nginx-configure-arguments '--with-http_ssl_module --with-http_v2_module' |
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 characters
| wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh |
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 characters
| #!/usr/bin/env puma | |
| require 'puma_worker_killer' | |
| require 'concurrent' | |
| # Change to match your CPU core count | |
| workers Concurrent.processor_count || 1 | |
| # Min and Max threads per worker | |
| min_thread = ENV['RAILS_MIN_THREADS'] || 0 |
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 characters
| # | |
| # Reboot into recovery mode (cmd +r ) and in the terminal | |
| # | |
| nvram boot-args="serverperfmode=1 ncl=262144" | |
| #reboot | |
| # | |
| # In regular mode |
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 characters
| require "net/http" | |
| def start_server | |
| # Remove the X to enable the parameters for tuning. | |
| # These are the default values as of Ruby 2.2.0. | |
| @child = spawn(<<-EOC.split.join(" ")) | |
| XRUBY_GC_HEAP_FREE_SLOTS=4096 | |
| XRUBY_GC_HEAP_INIT_SLOTS=10000 | |
| XRUBY_GC_HEAP_GROWTH_FACTOR=1.8 | |
| XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0 |
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 characters
| user nobody nogroup; | |
| # One worker process per CPU core. | |
| worker_processes 2; | |
| # Also set | |
| # /etc/security/limits.conf | |
| # web soft nofile 65535 | |
| # web hard nofile 65535 | |
| # /etc/default/nginx |
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 characters
| cd /tmp | |
| git clone https://github.com/vozlt/nginx-module-vts.git | |
| git clone https://github.com/openresty/headers-more-nginx-module.git | |
| sudo apt-get install libgeoip-dev libssl-dev | |
| sudo mkdir /usr/local/share/GeoIP | |
| sudo mkdir /usr/local/nginx/conf/conf.d | |
| wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
| wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz |