Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
Created May 22, 2013 15:21
Show Gist options
  • Save robwilkerson/5628431 to your computer and use it in GitHub Desktop.
Save robwilkerson/5628431 to your computer and use it in GitHub Desktop.
Enables gzip and adjusts for a Virtualbox bug w/ sendfile.
# Tweak the Nginx conf. sendfile is broken on Virtualbox.
echo -n "Setting the Nginx configuration..."
sed -i -r -e 's/sendfile\s*on/sendfile off/g' /etc/nginx/nginx.conf
sed -i -r -e 's/^(\s*)#\s*gzip on(.*)$/\1gzip on\2/' /etc/nginx/nginx.conf
sed -i -r -e 's/^(\s*)#\s*gzip_types(.*)$/\1gzip_types\2/' /etc/nginx/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment