#Country ban with UFW#
Grab your different country ip addresses and save as Linux IPTables
http://www.ip2location.com/free/visitor-blocker
##Add country## Run the following command
machine github.com | |
login technoweenie | |
password SECRET | |
machine api.github.com | |
login technoweenie | |
password SECRET |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
server { | |
listen 80; | |
server_name nessus.gmi.oeaw.ac.at; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
server_name nessus.gmi.oeaw.ac.at; | |
client_max_body_size 100m; |
#Country ban with UFW#
Grab your different country ip addresses and save as Linux IPTables
http://www.ip2location.com/free/visitor-blocker
##Add country## Run the following command
This is a sequel to "Postfix: relay to authenticated SMTP".
I would like to send mail from two different Gmail accounts using Postfix. Here is the relevant section in the Postfix documentation: Configuring Sender-Dependent SASL authentication.
As a concrete example, here's how to set up two Gmail accounts (only relevant sections of the config files are listed below):
/etc/postfix/main.cf:
# sender-dependent sasl authentication
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
You can set your own custom Magento admin URL in:
System -> Configuration -> [ADVANCED] -> Admin -> Admin Base URL
NOTE: Make sure you have added a ServerAlias directive to your virtual host configuration for backend.domain.com and that you have a SSL cert or wildcart setup for HTTPS traffic on that subdomain or you will lock yourself out the admin.
Rules for your .htaccess file to prevent duplicate urls and redirect directly to admin dashboard:
⇐ back to the gist-blog at jrw.fi
Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl
. Hold onto your hats, there's some Bucket Policy acrobatics ahead.
There's also a tl;dr at the very end if you just want the delicious copy-pasta.
# 0. For the server, use the "Docker" base image from the ImageHub (https://www.scaleway.com/de/imagehub/docker/) | |
# 1. Install https://github.com/calavera/docker-volume-glusterfs | |
# Alternatively, just download the prebuilt executable from https://gobuilder.me/get/github.com/calavera/docker-volume-glusterfs/docker-volume-glusterfs_master_linux-arm.zip | |
apt-get -y install golang | |
export GOPATH=~/go | |
go get github.com/calavera/docker-volume-glusterfs | |
mv go/bin/docker-volume-glusterfs /usr/local/bin/ | |
# 2. Install GlusterFS |