user nobody;
# no need for more workers in the proxy mode
worker_processes 4;
error_log /var/log/nginx/error.log warn;
worker_rlimit_nofile 20480;
events {
worker_connections 4048; # increase for busier servers
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
var vehicle = {}; | |
vehicle.drive = function () { | |
console.log('vrooom...'); | |
}; | |
// Create -> Make car "inherit" vehicle | |
var car = Object.create(vehicle); | |
car.honk = function() { |
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
*.log | |
*.zip | |
*.rar | |
robots.txt | |
.htaccess | |
sitemap.xml | |
sitemap.xml.gz | |
wp-config.php | |
wp-content/* | |
!wp-content/mu-plugins/ |
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/lib/php.ini -> on the bottom | |
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so | |
opcache.memory_consumption=64 | |
opcache.interned_strings_buffer=8 | |
opcache.max_accelerated_files=7963 | |
opcache.revalidate_freq=0 | |
opcache.fast_shutdown=1 | |
opcache.enable_cli=1 | |
opcache.enable=1 |
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
# Database | |
- Pastikan InnoDB | |
- Maria DB Engine | |
- https://wordpress.org/plugins/wp-optimize/ (per client approval) | |
# Plugin | |
- https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/ | |
- Wang guard | |
# Backup |
wget http://todiadiyatmo.com/speedbench.sh 2>/dev/null -O- | bash
adduser xxxx
ssh-keygen -t rsa -b 4096 -C "[email protected]"
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
## Track checkout remote branch | |
``` | |
git checkout --track origin/serverfix | |
``` | |
## Git track remote from current branch | |
``` | |
git branch -u origin/serverfix | |
``` |
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/sh | |
git --work-tree=/home/tiga/tiga-make --git-dir=/home/tiga/repo/site.git checkout -f | |
cd /home/tiga/tiga-make | |
chmod 755 . -R | |
/usr/local/bin/php /usr/local/bin/composer install | |
/usr/local/bin/php artisan tiga-make:clean | |
/usr/local/bin/php artisan asset:dist | |
/usr/local/bin/php artisan optimize |
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
#CloudFlare | |
set_real_ip_from 103.21.244.0/22; | |
set_real_ip_from 103.22.200.0/22; | |
set_real_ip_from 103.31.4.0/22; | |
set_real_ip_from 104.16.0.0/12; | |
set_real_ip_from 108.162.192.0/18; | |
set_real_ip_from 141.101.64.0/18; | |
set_real_ip_from 162.158.0.0/15; | |
set_real_ip_from 172.64.0.0/13; | |
set_real_ip_from 173.245.48.0/20; |