Skip to content

Instantly share code, notes, and snippets.

@IndiAsh
IndiAsh / custom_config.inc
Created May 20, 2020 23:42 — forked from centminmod/custom_config.inc
Custom Config options available for Centminmod.
# CENTMINMOD CUSTOM CONFIGURATIONS OPTIONS FILE
# PLEASE NOTE: This file serves as a file with all the possible options, NOT what should be used in a production enviornment!!!!
# https://centminmod.com
# Creating a custom_config.inc file it will override default setting for upgrades and software installs.
# Location: /etc/centminmod/custom_config.inc
EMAIL='' # Server notification email address enter only 1 address
PUSHOVER_EMAIL='' # Signup pushover.net push email notifications to mobile & tablets
CMGIT='https://github.com/centminmod/centminmod.git'
@IndiAsh
IndiAsh / php-pools.md
Created May 12, 2020 22:17 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@IndiAsh
IndiAsh / my.cnf
Created May 12, 2020 11:20 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@IndiAsh
IndiAsh / .htaccess
Created April 7, 2020 19:51 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2020
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@IndiAsh
IndiAsh / cloudflare_https_prefix.php
Created November 19, 2019 13:11 — forked from ptheofan/cloudflare_https_prefix.php
Cloudflare flexible SSL - trick PHP scripts to identify HTTPS when cloudflare reports it was HTTPS request
<?php
/*
Instructions
Go to your php.ini for the web scripts (pointless for cli scripts)
Make the following adjustment
auto_prepend_file = full/path/to/clousflare_https_prefix.php
reload/restart php service (or apache if running via apache)
How this works
@IndiAsh
IndiAsh / my.cnf
Created April 25, 2018 07:14 — forked from fevangelou/my.cnf
Optimized MySQL configuration for cPanel servers (updated July 2017)
# Optimized MySQL configuration for cPanel servers by Fotis Evangelou - Updated July 2017
#
# The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
# should be adjusted for your system by using MySQL DB diagnostics tools like:
# http://mysqltuner.com/
# or
# https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6)
@IndiAsh
IndiAsh / nginx.conf
Created October 6, 2016 07:50 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048