Skip to content

Instantly share code, notes, and snippets.

# Package generated configuration file
# See the sshd_config(5) manpage for details
# Modified by Slicehost
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
*filter
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
# Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#!/bin/sh
/sbin/iptables-restore < /etc/iptables.up.rules
#!/bin/bash
#
# Initial setup for Ubuntu 10.04 (Slicehost)
#
# Author : Carlos Jacobs
# Date : 16 Jul 2010
#
# change root password
passwd
user www-data www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
#!/bin/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u www-data -f /usr/bin/php5-cgi
#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
FASTCGI_USER=www-data
RETVAL=0
case "$1" in
start)
su - $FASTCGI_USER -c $PHP_SCRIPT
RETVAL=$?
;;
stop)
#!/bin/bash
#
# Install Nginx, PHP and fcgi on Ubuntu 10.04 (Slicehost).
# Execute as root
#
# Author : Carlos Jacobs
# Date : 16 Jul 2010
#
# install nginx, php5 , fastcgi
@carlosjac
carlosjac / nginxcreatevdomain.sh
Created July 16, 2010 19:05
NginxCreateVirtualDomain
#!/bin/bash
#
# Create a virtual domain on Nginx Ubuntu 10.04 (Slicehost)
# Execute as root
#
# Author : Carlos Jacobs
# Date : 16 Jul 2010
echo Please, enter domain
read DOMAIN
@carlosjac
carlosjac / CreateDigitalCertificate.sh
Created August 11, 2010 12:49
Create digital certificate.sh
#!/bin/bash
#
# Create digital certificates for a virtual domain on Ubuntu 10.04 (Slicehost)
# Execute as root
#
# Author : Carlos Jacobs
# Date : 11 Aug 2010
echo Please, enter domain
read DOMAIN