Skip to content

Instantly share code, notes, and snippets.

2.2 configuration:
Order deny,allow
Deny from all
2.4 configuration:
Require all denied
In this example, all requests are allowed.
If your browser downloads the file instead of displaying it?
sudo apt-get install libapache2-mod-php5 -y
After that enable php for apache
a2enmod php5
Restart server
sudo service apache2 restart
@teddevaal
teddevaal / gist:8575858
Last active March 22, 2017 09:05
Rotatelogs
Okay, spend way too much time on this one.
But however, use the following command to install rotatelogs
sudo apt-get install apache2-utils
By default the binary file is only accessible with superuser priviliges. Move the file to /usr/sbin/.
sudo mv /usr/bin/rotatelogs /usr/sbin/
Now you can gracefully start apache2 with custom logs ;)
@teddevaal
teddevaal / gist:7008243
Created October 16, 2013 14:02
Bundle production only
bundle install --without development test
@teddevaal
teddevaal / gist:7008084
Created October 16, 2013 13:52
Remove all gems from Gemfile
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done