Run Php code in html files.

Just use following code in your .htaccess file or apache configration file.

AddType application/x-httpd-php .html

Or for .htm

AddType application/x-httpd-php .htm

I found following article useful.
http://php.about.com/od/advancedphp/p/html_php.htm

Advertisements

How to start Activemq with XML configuration file

You can download Aapache activeMQ from following URL;
http://activemq.apache.org/activemq-530-release.html

Choose the your OS(Linux/Windows). After downloading apache-activemq-5.3.0-bin.zip.
Extract the ActiveMQ. Open command prompt and go to activeMQ/bin directory and run the “activemq” command.

ActiveMQ will start without configration.
If you are running ActiveMQ on local machine than you can open the ActiveMQ’s Admin from following URL;
http://0.0.0.0:8161/admin/ (8161 is default port)

If you want to run ActiveMQ with XML file. Use following command
#bin/activemq xbean:file:../config.xml

For more information Please visit the http://activemq.apache.org/

How to install and setup varnish on fedora9

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In contrast to other HTTP accelerators, many of which began life as client-side proxies or origin servers, Varnish was designed from the ground up as an HTTP accelerator.

Use following command:
[root@localhost purab]# su
[root@localhost purab]# yum install varnish
ncurses are needed for textual “graphical” configuration.
[root@localhost purab]# yum install ncurses-devel

Edit the setting of varnish
[root@localhost purab]# vim /etc/varnish/default.vcl

Start the varnish.
[root@localhost varnish]# /etc/init.d/varnish start

on startup set varnish on
[root@localhost varnish]# /sbin/chkconfig varnish on

How to use hosts file on Mac, Windows and Linux

The hosts file is a computer file used by an operating system to map hostnames to IP addresses.
On many operating systems, the host file content is used preferentially over other methods,
such as the Domain Name System (DNS). Unlike DNS, the hosts file is under the control of the local computer’s administrator

Locate the file “Hosts” on your computer:
Windows
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts

Linux
/etc/hosts or /etc/host.conf or /etc/nsswitch.conf

Symbian
C:\system\data\hosts

Mac OS
/private/etc/hosts or /etc/hosts

In that file you can edit entry like this

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost localhost yourlocaldomain.com , example.com
::1 localhost6.localdomain6 localhost6
192.168.2.200 intranet

directory.example.com 71.155.186.91