Apache2 Configuration under Debian GNU/Linux
Files and Directories in '/etc/apache2'
Tools
Using mod_cache_disk
SSL
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| # requires a recent enough python with idna support in socket | |
| # pyopenssl, cryptography and idna | |
| from OpenSSL import SSL | |
| from cryptography import x509 | |
| from cryptography.x509.oid import NameOID | |
| import idna | |
| from socket import socket |
This file contains hidden or 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 -e | |
| # wait-for-postgres.sh | |
| # Adapted from https://docs.docker.com/compose/startup-order/ | |
| # Expects the necessary PG* variables. | |
| until psql -c '\l'; do | |
| echo >&2 "$(date +%Y%m%dt%H%M%S) Postgres is unavailable - sleeping" | |
| sleep 1 | |
| done |
This file contains hidden or 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
| // Running Instructions | |
| // 1. Get a docker ELK instance up and running - I used https://github.com/deviantony/docker-elk | |
| // 2. Compile this (fill in the right variables before) | |
| // 3. Run this script | |
| // 4. ??? | |
| // 5. Go to Kibana to see all the click messages | |
| package main | |
| import ( |
This file contains hidden or 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 | |
| #Ask some info | |
| echo -n "Enter ELK Server IP or FQDN: " | |
| read eip | |
| echo -n "Enter Admin Web Password: " | |
| read adpwd | |
| #Update System | |
| sudo apt-get update | |
| sudo apt-get upgrade -y |
This file contains hidden or 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 | |
| echo 'Creating CA (ca-key.pem, ca.pem)' | |
| echo 01 > ca.srl | |
| openssl genrsa -des3 -passout pass:password -out ca-key.pem 2048 | |
| openssl req -new -passin pass:password \ | |
| -subj '/CN=Non-Prod Test CA/C=US' \ | |
| -x509 -days 365 -key ca-key.pem -out ca.pem | |
| echo 'Creating client certificates (key.pem, cert.pem)' |
This file contains hidden or 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
| package main | |
| import ( | |
| "os" | |
| "log" | |
| "net" | |
| "strconv" | |
| "strings" | |
| ) |
This file contains hidden or 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 | |
| CONFIG_FILE="/etc/httpd/conf/httpd.conf" | |
| DATE=`date '+%Y%m%d'` | |
| if [ -f "${CONFIG_FILE}.orig.${DATE}" ]; then | |
| echo '(maybe)apache config file is already converted. :-P' | |
| exit | |
| fi |