Skip to content

Instantly share code, notes, and snippets.

#!/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/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 6 -u www-data -f /usr/bin/php5-cgi
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/bash
#
# Initial setup for Ubuntu 10.04 (Slicehost)
#
# Author : Carlos Jacobs
# Date : 16 Jul 2010
#
# change root password
passwd
#!/bin/sh
/sbin/iptables-restore < /etc/iptables.up.rules
*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
# 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