Skip to content

Instantly share code, notes, and snippets.

View RocketSharck's full-sized avatar

RocketSharck

View GitHub Profile
@RocketSharck
RocketSharck / sendy-server
Last active June 11, 2019 23:16 — forked from refringe/sendy-server
Nginx configuration file example for Sendy (http://sendy.co/).
# Marketing (Sendy) Installation
#
server {
root /var/www/marketing.site.com;
index index.php index.html index.htm;
server_name marketing.site.com;
autoindex off;
@RocketSharck
RocketSharck / rsync.sh
Created December 4, 2019 23:28 — forked from macmladen/exclude-rsync.sh
rsync exclude patterns
# /dir/ means exclude the root folder /dir
# /dir/* means get the root folder /dir but not the contents
# dir/ means exclude any folder anywhere where the name contains dir/
# Examples excluded: /dir/, /usr/share/mydir/, /var/spool/dir/
# /dir means exclude any folder anywhere where the name contains /dir
# Examples excluded: /dir/, /usr/share/directory/, /var/spool/dir/
# /var/spool/lpd//cf means skip files that start with cf within any folder within /var/spool/lpd
#
# include, +
# exclude, -
@RocketSharck
RocketSharck / protect.conf
Created October 10, 2020 15:03 — forked from VirtuBox/protect.conf
Nginx Configuration to block SQL Injection and similar attacks
location ~* "(eval\()" { deny all; }
location ~* "(127\.0\.0\.1)" { deny all; }
location ~* "([a-z0-9]{2000})" { deny all; }
location ~* "(javascript\:)(.*)(\;)" { deny all; }
location ~* "(base64_encode)(.*)(\()" { deny all; }
location ~* "(GLOBALS|REQUEST)(=|\[|%)" { deny all; }
location ~* "(<|%3C).*script.*(>|%3)" { deny all; }
location ~ "(\\|\.\.\.|\.\./|~|`|<|>|\|)" { deny all; }
location ~* "(boot\.ini|etc/passwd|self/environ)" { deny all; }
location ~* "(thumbs?(_editor|open)?|tim(thumb)?)\.php" { deny all; }
@RocketSharck
RocketSharck / nginx-wordpress.conf
Created October 10, 2020 16:29 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@RocketSharck
RocketSharck / install-docker.sh
Created July 25, 2021 15:48 — forked from p3jitnath/install-docker.sh
Docker and Nvidia Docker installation in Ubuntu 20.04 LTS
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned.
# Docker
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
docker --version
/**
* jQuery iLightBox - Revolutionary Lightbox Plugin
* http://www.ilightbox.net/
*
* @version: 2.2.3 - June 03, 2017
*
* @author: Hemn Chawroka
* http://www.iprodev.com/
*
*/
@RocketSharck
RocketSharck / yii2-server-config.md
Created August 6, 2021 14:50 — forked from yidas/yii2-server-config.md
Yii2 Server Configuration for Nginx & Apache (Subdirectory)

Yii2 Server Configuration for Nginx & Apache (Subdirectory)

It's easy to configurate a Yii2 server site with directory protection:

Yii2 Web Server Configuration

Sub Directory Site Application

With using Sub Directory for Yii2, you could set sub-directory path into yii2's config: