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
#/bin/bash | |
apt-get install software-properties-common -y | |
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449 | |
add-apt-repository 'deb http://dl.hhvm.com/ubuntu trusty main' | |
apt-get update | |
apt-get install hhvm -y | |
/usr/share/hhvm/install_fastcgi.sh | |
/etc/init.d/hhvm restart | |
update-rc.d hhvm defaults |
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
extension=memcache.so | |
[memcache] | |
memcache.allow_failover=1 | |
memcache.archivememlim=0 | |
memcache.chunk_size=32768 | |
memcache.dbpath="/var/lib/memcache" | |
memcache.default_port=0 | |
memcache.hash_strategy="consistent" | |
memcache.maxfiles=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
#/bin/bash | |
apt-get install apt-transport-https -y | |
curl https://repo.varnish-cache.org/GPG-key.txt | apt-key add - | |
echo "deb https://repo.varnish-cache.org/ubuntu/ trusty varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list | |
echo "deb-src https://repo.varnish-cache.org/ubuntu/ trusty varnish-4.0" >> /etc/apt/sources.list.d/varnish-cache.list | |
apt-get update | |
apt-get install varnish -y |
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
#[...] | |
DAEMON_OPTS="-a :80 \ | |
-T localhost:6082 \ | |
-f /etc/varnish/default.vcl \ | |
-S /etc/varnish/secret \ | |
-p thread_pool_add_delay=2 \ | |
-p thread_pools=2 \ | |
-p thread_pool_min=400 \ | |
-p thread_pool_max=4000 \ |
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
vcl 4.0; | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
# Configurações de performance | |
sub vcl_recv { | |
if (req.url ~ "(?i)\.(css|js|jpg|jpeg|gif|png|ico)(\?.*)?$") { | |
unset req.http.Cookie; | |
} |
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
#/bin/bash | |
cd | |
wget http://repo.ajenti.org/debian/key -O- | apt-key add - | |
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install ajenti -y | |
apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql ajenti-v-ftp-pureftpd -y | |
service ajenti restart |
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
TEMPLATE_CONFIG_FILE = """ | |
#AUTOMATICALLY GENERATED - DO NO EDIT! | |
user %(user)s %(user)s; | |
pid /var/run/nginx.pid; | |
worker_processes %(workers)s; | |
worker_rlimit_nofile 100000; | |
events { | |
worker_connections 4096; |
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
$TTL 604800 | |
@ IN SOA ns1.abc.com. hostmaster.abc.com. ( | |
5 ; Serial | |
604800 ; Refresh | |
86400 ; Retry | |
2419200 ; Expire | |
604800 ) ; Negative Cache TTL | |
; |
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
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; |
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
location ~ \.(hh|php)$ { | |
proxy_intercept_errors on; | |
error_page 502 = @fallback; | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_keep_conn on; | |
include /etc/nginx.custom.d/fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |