This file contains 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
# | |
# Name: nginx-tls.conf | |
# Auth: Chris van Steenbergen <[email protected]> | |
# Date: 13 June 2016 | |
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
# | |
# Enables HTTP2, PFS, HSTS and OCSP stapling. Configuration options not related | |
# to SSL/TLS are omitted here. | |
# | |
# Preparation: Strong 4096 bits DHE parameters (takes time) |
This file contains 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
<?php | |
// This script must be run on a command line | |
error_reporting(E_ALL); | |
set_time_limit(1200); | |
date_default_timezone_set("Europe/Amsterdam"); | |
$mysqli = new mysqli('localhost', 'username', 'password', 'table'); | |
if ($mysqli->connect_error) { |
This file contains 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 | |
apt update && apt install wget htop curl nano ssh -y | |
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb | |
dpkg -i zabbix-release_3.2-1+xenial_all.deb && apt-get update | |
export DEBIAN_FRONTEND=noninteractive | |
apt install zabbix-server-mysql zabbix-frontend-php -y |
This file contains 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
sudo su | |
echo "deb http://downloads.hipchat.com/linux/apt stable main" > /etc/apt/sources.list.d/atlassian-hipchat.list | |
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add - | |
apt-get update | |
apt-get install hipchat |
This file contains 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/bin/env bash | |
apt-get install -y libpcre3 libpcre3-dev libssl-dev unzip make \ | |
libgoogle-perftools-dev google-perftools jq | |
mkdir /tmp/ngxbuild | |
cd /tmp/ngxbuild | |
latestNginx=$(curl -s http://hg.nginx.org/nginx/tags | | |
grep "^ *release-" | head -1 | cut -c 9-) | |
latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases | | |
jq -r .[].tag_name | grep -v rc | head -1) |
This file contains 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
################################## | |
## INTERNAL RULES IDS:1-999 ## | |
################################## | |
#@MainRule "msg:weird request, unable to parse" id:1; | |
#@MainRule "msg:request too big, stored on disk and not parsed" id:2; | |
#@MainRule "msg:invalid hex encoding, null bytes" id:10; | |
#@MainRule "msg:unknown content-type" id:11; | |
#@MainRule "msg:invalid formatted url" id:12; | |
#@MainRule "msg:invalid POST format" id:13; | |
#@MainRule "msg:invalid POST boundary" id:14; |
This file contains 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 | |
# This file is under construction and will be update regulary, so it can be a cron-shell for backing up Linux based systems. | |
# put this in the cronjob to run the backup every day at 2:15 | |
# 15 2 * * * /var/backups/backup.sh | |
current="$(date +'%d_%m_%Y_%H_%M_%S')" | |
# MYSQL BACKUP | |
sudo mysqldump -u root -pPASSWORD --all-databases | gzip > /var/backups/dbbackup_$current.sql.gz | |
# WEBSITES BACKUP | |
sudo tar czf /var/backups/sitebackup_$current.tar -C / var/www && gzip /var/backups/sitebackup_$current.tar | |
# DELETE OLD BACKUPS > 7 days |
This file contains 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/bin/env bash | |
apt-get install -y libpcre3 libpcre3-dev libssl-dev unzip make \ | |
libgoogle-perftools-dev google-perftools jq | |
mkdir /tmp/ngxbuild | |
cd /tmp/ngxbuild | |
latestNginx=$(curl -s http://hg.nginx.org/nginx/tags | | |
grep "^ *release-" | head -1 | cut -c 9-) | |
latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases | | |
jq -r .[].tag_name | grep -v rc | head -1) |
This file contains 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/bash | |
# Modify the following to match your system | |
NGINX_CONFIG='/etc/nginx/sites-available' | |
NGINX_SITES_ENABLED='/etc/nginx/sites-enabled' | |
PHP_INI_DIR='/etc/php5/fpm/pool.d' | |
WEB_SERVER_GROUP='www-data' | |
NGINX_INIT='/etc/init.d/nginx' | |
PHP_FPM_INIT='/etc/init.d/php5-fpm' | |
# --------------END |
OlderNewer