Skip to content

Instantly share code, notes, and snippets.

View iamkingsleyf's full-sized avatar

Kingsley Felix iamkingsleyf

View GitHub Profile
@plentz
plentz / nginx.conf
Last active April 18, 2024 12:42
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@lukecav
lukecav / DNS Prefetch domains
Last active March 30, 2024 20:53
WP Rocket - Advanced Options Prefetch DNS requests examples
//maps.googleapis.com
//maps.gstatic.com
//fonts.googleapis.com
//fonts.gstatic.com
//ajax.googleapis.com
//apis.google.com
//google-analytics.com
//www.google-analytics.com
//ssl.google-analytics.com
//youtube.com
@ryanjbonnell
ryanjbonnell / wp-config.php
Created March 12, 2014 15:51
WordPress Config: Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
// Use X-Forwarded-For HTTP Header to Get Visitor's Real IP Address
if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
$http_x_headers = explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] );
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
}
@janikvonrotz
janikvonrotz / Install WordPress Blog.md
Created March 3, 2014 08:21
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
@markjaquith
markjaquith / nginx.conf
Last active December 25, 2022 15:55
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@lukebranch
lukebranch / 4GB-4Core-VPS-my.cnf
Created October 22, 2014 10:12
/etc/my.cnf config for 4GB RAM 4 Core VPS - Wordpress
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
@Globegitter
Globegitter / nginx-latest.sh
Last active May 7, 2022 18:19
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
@petemcw
petemcw / my.cnf
Created February 25, 2011 20:11
Ubuntu MySQL 5.1 Configuration - 4GB RAM, Heavy InnoDB
# The MySQL database server configuration file.
#
# DESC: InnoDB mainly, heavy queries, fewer connections, 4GB RAM
#
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
@evansolomon
evansolomon / gist:2274120
Created April 1, 2012 09:36
nginx WordPress multisite config
server {
listen 80 default_server;
server_name domain.com *.domain.com;
root /srv/www/domain.com/public;
access_log /srv/www/domain.com/log/access.log;
error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;