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
user nginx; | |
worker_processes 3; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
use epoll; | |
} |
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
upstream example.com.backend { | |
server 127.0.0.1:3000; | |
} | |
# redirect with | |
server { | |
listen 80; | |
server_name example.com *.example.com; | |
rewrite ^ http://www.example.com$request_uri? permanent; | |
} |
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 | |
# djb svscan | |
# | |
# description: svscan | |
# | |
# chkconfig: 2345 96 98 | |
# Source function library | |
. /etc/rc.d/init.d/functions |
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
This patch causes the various qmail programs to generate date stamps in | |
the local timezone. I find GMT too annoying to convert from/to. I make | |
no warranties that it will work in your timezone, however it works for me. | |
Works with qmail 1.01 to 1.03. | |
To apply this patch, cd into the qmail source directory and type... | |
patch -s -p1 < patch-to-patch-file | |
--- qmail-1.03.orig/date822fmt.c Tue Apr 15 15:05:23 1997 |
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 | |
# via http://www.pictnotes.jp/wp/?p=202 | |
# | |
# curl -o /tmp/install_qmail.sh https://gist.github.com/pacojp/5768857/raw | |
# /bin/bash /tmp/install_qmail.sh <HOSTNAME> | |
# | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 |
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 | |
# | |
# qmail | |
# | |
# chkconfig: 2345 80 30 | |
# description: qmail start/stop script | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#RewriteLog "logs/rewrite_log" | |
#RewriteLogLevel 0 | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^/cgi-bin/qmailadmin(.*)?$ https://%{HTTP_HOST}/cgi-bin/qmailadmin [L,R] | |
</IfModule> |
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 | |
usage(){ | |
echo "Usage: bckconf filename" | |
exit 1 | |
} | |
# args error | |
[[ $# -eq 0 ]] && usage |
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
use strict; | |
# a minimalistic configuration file for amavisd-new with all necessary settings | |
# | |
# see amavisd.conf-default for a list of all variables with their defaults; | |
# for more details see documentation in INSTALL, README_FILES/* | |
# and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html | |
# COMMONLY ADJUSTED SETTINGS: |
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 | |
# Example script for adding a Maildir to a Courier-IMAP virtual mail | |
# hierarchy. | |
# The script only looks at argument 3, assuming that it | |
# indicates the relative name of a maildir, such as | |
# "somedomain.com/peter/". | |
# This script should be run as the user which owns the maildirs. If |