Skip to content

Instantly share code, notes, and snippets.

View sxander's full-sized avatar

Sascha Xander sxander

View GitHub Profile
@justinhartman
justinhartman / 01_nginx-reload-post-hook.sh
Last active June 29, 2024 17:27
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <code@justinhartman.co>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@cerico
cerico / sample.nginx.conf
Last active July 22, 2021 22:08
Samples Nginx.conf to get A+ score on Mozilla's Observatory
server {
listen 80;
server_name cituu.io37.ch;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name cituu.io37.ch;
ssl_certificate /etc/letsencrypt/live/cituu.io37.ch/fullchain.pem;
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@programmer131
programmer131 / ns-inet.sh
Last active June 19, 2024 11:31 — forked from dpino/ns-inet.sh
Setup a network namespace with Internet access
IFACE=wlp2s0
NS="ns1"
VETH="veth1"
VPEER="vpeer1"
VETH_ADDR="10.200.1.1"
VPEER_ADDR="10.200.1.2"
ip li delete ${VETH} 2>/dev/null
# Remove namespace if it exists.
ip netns del $NS &>/dev/null
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active July 6, 2024 20:26
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;
}
@flaviocarmo
flaviocarmo / nginx-alertmanager-prometheus
Created February 11, 2020 21:56 — forked from albertogviana/nginx-alertmanager-prometheus
Nginx reverse proxy for Prometheus and Alertmanager
upstream @prometheus {
server MY_IP:9090;
}
upstream @alertmanager {
server MY_IP:9093;
}
server {
listen 80;
@alt-grr
alt-grr / awstats.conf
Created November 28, 2019 20:06
AWStats on Debian 10 with ngnix - separate domain setup
server {
listen 80;
server_name awstats.EXAMPLE.COM;
root /var/www/awstats;
error_log /var/log/nginx/error-awstats.log;
access_log off;
log_not_found off;
location ^~ /awstats-icon {
@josephbadow
josephbadow / install-fireflyiii-rpi3-docker-docker-compose-ssl.md
Created September 23, 2019 10:13
Install Firefly on a Raspberry Pi 3 with Docker, Docker Compose and a self-signed certificate

I'm running a dockerized Firefly III on a Raspberry 3 in my local network. With the help of an additional nginx Container and a self-signed SSL Certificate I was able to set up https.

Maybe somebody will find this guide helpfull, it took me a couple of tries to get it right.

Install Docker on the Raspberry

Simply follow the official documentation at https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-convenience-script. You'll need to run the script if you are using the default Raspberry OS: Raspbian.

Install Docker Compose using Python PIP

Use Pythons package manager PIP to install Docker Compose, details can be found on docker.com as well: https://docs.docker.com/compose/install/#install-using-pip. Before you can follow the guide you'll need to install python-pip.

@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active July 25, 2024 13:34
Ubuntu and Debian Cloud images in Proxmox
@Goddard
Goddard / oidgen.vbs
Created June 26, 2019 15:31
This script is a modification to the original oidgen.vb script. It adds a required DLL register and prints it to a file for easy copy pasting and saving. -------------------- Generates an object identifier (OID) using a GUID and the OID prefix 1.2.840.113556.1.8000.2554. This script contributed by Omar Sinno of Microsoft. Original - https://gall…
' oidgen.vbs
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
' OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
' FITNESS FOR A PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved
' Improvements made by Ryein C. Goddard
'
' This script is not supported under any Microsoft standard support program or service.