Skip to content

Instantly share code, notes, and snippets.

View imarcelolz's full-sized avatar
😃

Marcelo Zaniolo imarcelolz

😃
View GitHub Profile
@imarcelolz
imarcelolz / Vagrantfile
Last active January 8, 2016 13:00
Vagrantfile - Ubuntu 14.04.02 - rbenv and ruby 2.2.0 vm
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
[www]
ping.path = /ping
[www]
; at any time, there can be no more than 5 child processes
; if you know how much memory each process consumes regularly
; and how much free memory you have on your system, this is how
; you set a "hard limit" on the amount of memory php-fpm will be able to consume
pm.max_children = 5
; when php-fpm first starts, how many processes should
; it immediately generate to handle requests?
; when you restart php-fpm, there may be an influx of requests.
upstream php {
server unix:/var/run/php5-fpm.socket;
}
# make sure index.php is first in all our vhosts
index index.php index.html index.htm;
charset utf-8;
expires max;
# most people include something like this. don't.
# check your default nginx.conf, it's already covered in a much better way.
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# compress proxied requests too.
# it doesn't actually matter if the request is proxied, we still want it compressed.
gzip_proxied any;
# a pretty comprehensive list of content mime types that we want to compress
# there's a lot of repetition here because different applications might use different
@imarcelolz
imarcelolz / ssl.conf
Last active December 20, 2015 18:19 — forked from chrismeller/gist:4748033
# we want to enable ssl session resumption to avoid
# having to start the handshake from scratch each page load
# so first we enable a shared cache, named SSL (creative!) that is 10mb large
ssl_session_cache shared:SSL:10m;
# save things in the cache for 3 minutes
# if you're not making a request at least every 3 minutes, this isn't going
# to accomplish anything anyway
ssl_session_timeout 3m;
client_max_body_size 32m;
server {
# the same as for non-ssl, except we indicate that when listening on port
# 443, it should use ssl
listen [::]:443 ssl;
server_name blog.chrismeller.com new.chrismeller.com;
# turn ssl on, and specify the certificate (chain) and key file
ssl on;
ssl_certificate ssl/chrismeller.com.2012.pem;
ssl_certificate_key ssl/chrismeller.com.2012.key;