Tuesday, April 29, 2008

Enable mod_proxy in apache

Apache with mod_proxy can be configured to forward client request to other servers. Here is how to enable mod_proxy with ProxyPass and ProxyPassReverse directives. It is recommended to create a configuration file test.conf at /httpd/conf.d/ instead of editing the /httpd/conf/httpd.conf

The difference between http and https configuration is only the port and proxy url.

For http => The port will be 80 and the URL is http://test.company.com
For https => The port will be 443 and the URL is https://test.company.com


</VirtualHost 10.20.10.111:80>

# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:

ProxyRequests On

Order allow,deny
Allow from all

# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On

# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
# CacheEnable disk /
# CacheRoot "/var/cache/mod_proxy"
# End of proxy directives.

# Allows the proxying of a SSL connection
##SSLProxyEngine On

ProxyPreserveHost On

ServerName test.company.com
ErrorLog logs/test_http_error_log
CustomLog logs/test_http_access_log combined
ProxyPass / http://test.company.com/
ProxyPassReverse / http://test.company.com/

</VirtualHost>

Thursday, April 24, 2008

Restore your Desktop folder in Ubuntu

If u you have accidentally deleted the Desktop folder, it will be placed in Trash. Unfortunately you can't restore to the actual location. Don't worry. Try this steps and you can restore it to the existing location(recommended) or even you can change the location.

1) gedit ~/.config/user-dirs.dirs
2) Make sure your XDG_DESKTOP_DIR="$HOME/Desktop"

This is how standard settings will be :-












3) Restart your machine.

Thats All. Done

Wednesday, April 16, 2008

MySqlTuner

MySqlTuner is a mysql tuning script written in perl. It generates MySQL server's performance statistics and reports.Moreover it will specify recommendations to boost the MySQL server's performance.

To GET is just

# wget http://mysqltuner.com/mysqltuner.pl
# chmod a+x mysqltuner.pl
# ./mysqltuner.pl

Here is a sample report using MySqlTuner

Tuesday, April 1, 2008

GKrellM (GNU Krell Monitors)

GKrellM is a computer program based on the GTK+ toolkit that creates a single process stack of system monitors. It can be used to monitor the status of CPUs,main memory,hard disks,network interfaces, local and remote mailboxes, and many other things.

To make use of this program ;

1) Access to a server that need to be monitored (10.20.10.111) - e.g Centos5
yum install gkrellm-daemon

2) Once installed check netstat -l and you will see the program running on port 19150

3) On your client machine (localhost) -e.g ubuntu

i) apt-get install gkrellm
ii)
ssh -NfL 19150:localhost:19150 10.20.10.111
iii) gkrellm -s localhost -P 19150