- Install apache2. On Ubuntu type:
# apt-get install apache2
- Activate mod_proxy:
# a2enmod proxy
- Create a new file in /etc/apache2/sites-available, named metak (or whatever):
NameVirtualHost * <Virtualhost *> DocumentRoot "/var/www/metak" ServerName localhost ServerAdmin support@mycompany.com DirectoryIndex index.html index.phpProxyRequests On ProxyPreserveHost On ProxyVia full <proxy> Order deny,allow Allow from all </proxy> ProxyPass / http://www.metak.com ProxyPassReverse / http://www.metak.com </Virtualhost> - Enable the new site and restart apache2:
# a2ensite metak # /etc/init.d/apache2 reload
Monthly Archives: October 2006
Apache's ProxyPass on Ubuntu
Ruby tricks
A short little method that helps find methods up the class latter:
class Object
def my_methods
self.class.ancestors.each {|anc|
puts "#{anc}:"
p anc.instance_methods(false)
puts
}
end
end
5.times.my_methods
It was copied from Stupid easy Ruby tricks
Recursive recovery of MySQL databases
On Red Hat Enterprise MySQL is recovered with these commands:
cd /var/lib/mysql
find . -name "*.MYI" -exec myisamchk -r '{}' \;
