Skip to content

Instantly share code, notes, and snippets.

View kanibaspinar's full-sized avatar
🏠
Working from home

Kani kanibaspinar

🏠
Working from home
View GitHub Profile
@kanibaspinar
kanibaspinar / default.conf
Created June 13, 2016 09:20
Prevention of new types of attacks at Layer 7 with nginx
# Back up the old files before editing #
if ($http_user_agent ~* (Trident*) ) {
return 444;
}
if ($http_user_agent ~* (-) ) {
return 444;
}
if ($http_user_agent ~* (Java) ) {
return 444;
}
@kanibaspinar
kanibaspinar / httpd.conf
Last active March 2, 2020 09:26
Apache Configurations
#This settings are not compatible to each server! Workable Conf ; 24 GB Ram 8 Cpu Dedicated Server #
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 500
MaxRequestWorkers 500 (this option was previously called MaxClients in Apache v2.4)
MaxRequestsPerChild 4000
Timeout 20
# Happy Optimizations $KBŞP #
@kanibaspinar
kanibaspinar / my.cnf
Last active May 28, 2024 09:46
Mysql My.cnf Optimization - Best Performance For 1000 + Sites Web Server
# Optimized MySQL configuration for cPanel servers by Kani Baspinar - Updated June 2016
#
# The settings provided below are a starting point for a 24GB RAM server with 8 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# Test your configuration ; https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is NO comment beside a setting, then you don't need to adjust it.
#