Skip to content

Instantly share code, notes, and snippets.

@fdrescher
fdrescher / gist:1337857
Created November 3, 2011 21:38
httpd.conf
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
@fdrescher
fdrescher / gist:1337852
Created November 3, 2011 21:37
recipes/default.rb
package "httpd"
service "httpd" do
action :start
end
template "/var/www/html/index.html" do
source "index.html.erb"
owner "root"
group "root"
@fdrescher
fdrescher / gist:1337753
Created November 3, 2011 20:57
metadata.rb
attribute "quickstart/name",
:display_name => "Your name",
:description => "Your name: Visible to the world!",
:required => true,
:recipes => [ "apache-quickstart::default" ]
@fdrescher
fdrescher / gist:1337746
Created November 3, 2011 20:53
index.html.erb
<HTML>
<HEAD>
</HEAD>
<BODY>
Hello <%= node[:quickstart][:name] %>!
</BODY>
</HTML>
@fdrescher
fdrescher / gist:1337741
Created November 3, 2011 20:52
attributes/default.rb
default[:quickstart][:name] = "Florian"
@fdrescher
fdrescher / gist:1337738
Created November 3, 2011 20:50
default.rb
package "httpd"
service "httpd" do
action :start
end
template "/var/www/html/index.html" do
source "index.html.erb"
user root
group root
SERVER=107.22.65.150
KEY=/home/user/ec2-keys-fdrescher/default-EC2-US.pem
SOURCE=/home/user/workspace/quickstart
DEST=/var/cache/rightscale/cookbooks/3466341cb692139718b2fdd998dbddf959a965db
rsync -vrPtz -e "ssh -i $KEY -l root" $SOURCE $SERVER:$DEST && ssh -i $KEY root@$SERVER "rs_run_recipe -n \"apache-quickstart::default\";tailf /var/log/messages"
@fdrescher
fdrescher / php.ini
Created October 30, 2011 19:53
php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@fdrescher
fdrescher / apache-site.conf.erb
Created October 30, 2011 18:24
Apache configuration file
<VirtualHost *:8000>
DocumentRoot <%= @params[:docroot] %>
<Directory <%= @params[:docroot] %>>
AllowOverride All
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None