Wednesday, July 20, 2011

Amazon HAPROXY haproxy[12490]: proxy test has no server available!

This happens when haproxy is trying to find a status file on the server mentioned in rightscale_lb.cfg
If there is no file it does not recognize the server and errors out

haproxy proxy test has no server available!




server srv3.0  ip-xx-xx-xx-xxx.ec2.internal:80 cookie srv03.0 check inter 2000 rise 2 fall 3


Fix
comment out the contents from cookie something like this and restart the server service haproxy restart
server srv3.0  ip-xx-xx-xx-xx.ec2.internal:80 
#cookie srv03.0 check inter 2000 rise 2 fall 3

Saturday, July 9, 2011

Joomla 1.6 & Joomla 1.5 Remove index.php from the URL

This works!!!! If not mail me harshal82@gmail.com

Joomla 1.6 .
My Joomla is installed /var/www/joomla


1. Go to Site->Global Configuration and enable Search Firendly URL and use URL rewriting. Save.

2. Go to /var/www/joomla (myroot)  and rename htaccess.txt to .htaccess.
3. Enable apache mod rewrite  from terminal sudo a2enmod rewrite
4. Open nano .htaccess under /var/www/joomla

and below should be the setting

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* /joomla/index.php/$1 [L]
#
## End - Joomla! core SEF Section.



The line in red redirects the page to relavent page without changing the url.

http://yoursite/joomla/test should deliver the page.