Skip to content

Instantly share code, notes, and snippets.

View ricardofontanelli's full-sized avatar

Ricardo Fontanelli ricardofontanelli

View GitHub Profile
@ricardofontanelli
ricardofontanelli / Puphpet-Config-Nginx-gzip.yml
Last active February 5, 2017 18:52
Puphpet (https://puphpet.com/) is a great tool to build a virtual machine on your development environment, but if you need to tuning your nginx (or another service), you need to work diurect on config.yml (or config-custom.yml), file. Here we've a little example that shows us how to enable gzip on a nginx webserver. If you want to change another…
--- more lines
nginx:
install: '1'
settings:
version: present
default_vhost: 1
proxy_buffers: '4 256k'
proxy_buffer_size: 128k
proxy_connect_timeout: 600s
proxy_send_timeout: 600s
@ricardofontanelli
ricardofontanelli / Vagrantfile
Last active October 12, 2016 20:31
Based on [gist](https://gist.github.com/mrLexx/9619121), an easy way to keep your hosts file updated with the VM using Puphpet, Vagrant and [vagrant-hostupdater](https://github.com/cogitatio/vagrant-hostsupdater):
Vagrant.configure('2') do |config|
## Begin vagrant-hostsupdater
## https://github.com/cogitatio/vagrant-hostsupdater
## vagrant plugin install vagrant-hostsupdater
if Vagrant.has_plugin?('vagrant-hostsupdater') && (configValues['apache']['install'] == '1' || configValues['nginx']['install'] == '1')
if configValues['apache']['install'] == '1'
webserver = 'apache'
server_name_key = 'servername'
server_aliases_key = 'serveraliases'