Created
May 22, 2010 10:10
-
-
Save tjl2/409972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The ability to disable/enable access to phpMyAdmin on a Rails project that has | |
# an installation in the public directory. | |
namespace :phpmyadmin do | |
desc "Disable access to phpMyAdmin" | |
task :disable, :roles => :web do | |
run "echo 'deny from all' > #{current_path}/public/phpmyadmin/.htaccess" | |
end | |
desc "Enable access to phpMyAdmin" | |
task :enable, :roles => :web do | |
run "rm -f #{current_path}/public/phpmyadmin/.htaccess" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a quick capistrano task used on a Rails project that has an installation of phpMyAdmin in the Rails directory. I wrote this after seeing too many vulnerability scans occurring on the phpmyadmin directory.