<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coders helpdesk</title>
	<atom:link href="http://codershelpdesk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codershelpdesk.com</link>
	<description>Coders Community Blog</description>
	<lastBuildDate>Fri, 24 May 2013 05:53:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Amazing jQuery 3D Effects Plugins</title>
		<link>http://codershelpdesk.com/2012/11/20/amazing-jquery-3d-effects-plugins/</link>
		<comments>http://codershelpdesk.com/2012/11/20/amazing-jquery-3d-effects-plugins/#comments</comments>
		<pubDate>Tue, 20 Nov 2012 14:43:40 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[jQuery Plugins]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6582</guid>
		<description><![CDATA[Here is a collection of jQuery 3d effects plugins that is very easy to use for your websites. Check all the plugins and choose the best plugin that suits to your website. Hope you will enjoy the jQuery 3D effects plugins. 1. JQuery Rotator by Will Jessup Will Jessep created a jquery rotator which is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a collection of jQuery 3d effects plugins that is very easy to use for your websites. Check all the plugins and choose the best plugin that suits to your website. Hope you will enjoy the jQuery 3D effects plugins.</p>
<h2>1. JQuery Rotator by Will Jessup</h2>
<p>Will Jessep created a jquery rotator which is rotation some tags for better understanding visit the original post by clicking the below image.</p>
<p align="center"></p>
<p><a href="http://willjessup.com/sandbox/jquery/rotator/rotator.html"><img class="aligncenter size-full wp-image-6583" title="jquery 3d effects plugins" src="http://codershelpdesk.com/wp-content/uploads/2012/11/jquery-3d-effects-1.jpg" alt="jquery 3d effects plugins" width="718" height="364" /></a></p>
<h2>2. JQuery Three Dee by Steve Fenton</h2>
<p>The jQuery Three Dee project is a plugin that transforms plain text into eye-popping 3D text.<br />
You&#8217;ll need a pair of red/blue 3D glasses to view the 3D effect in this example.</p>
<p style="text-align: center;"><a href="http://www.stevefenton.co.uk/cmsfiles/assets/File/threedee.html"><img class="aligncenter size-full wp-image-6584" title="jquery 3d effects by three dee" src="http://codershelpdesk.com/wp-content/uploads/2012/11/jquery-3d-effects-2.jpg" alt="jquery 3d effects by three dee" width="762" height="336" /></a></p>
<h2>3. Rotate3Di by Zachary Johnson</h2>
<p>In order to use the rotate3Di jQuery plugin, your web page will need to include jQuery v1.2.6 or newer, the jQuery CSS Transform patch, and the rotate3Di plugin itself.</p>
<p align="center"></p>
<p style="text-align: center;"><a href="http://www.zachstronaut.com/projects/rotate3di/#demos"><img class="aligncenter size-full wp-image-6585" title="Rotate3Di by Zachary Johnson" src="http://codershelpdesk.com/wp-content/uploads/2012/11/jquery-3d-effects-3.jpg" alt="Rotate3Di by Zachary Johnson" width="643" height="187" /></a></p>
<h2>4. Viewer3D by Alban Xhaferllari</h2>
<p>Viewer3D is a small jQuery plugin for displaying a 360° view of a sequences of images or panorama. It is simple, lightweight, no flash needed, no extra css need, fast and compatible with all major browsers and touches devices. It has been tested on Android browsers, Ipad browser, IE 6,7,8,9 , Firefox, Chrome, Safari and Opera.</p>
<h2><a href="http://www.albanx.com/demo3d/index.php"><img class="aligncenter" title="Viewer3D by Alban Xhaferllari" src="http://codershelpdesk.com/wp-content/uploads/2012/11/jquery-3d-effects-4.jpg" alt="Viewer3D by Alban Xhaferllari" width="656" height="266" /></a></h2>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/11/20/amazing-jquery-3d-effects-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Interview Questions And Answers Part-3</title>
		<link>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-3/</link>
		<comments>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-3/#comments</comments>
		<pubDate>Fri, 06 Jul 2012 04:47:03 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6547</guid>
		<description><![CDATA[This is the continuation to the Apache Interview Questions And Answers Part-2 8. Why do I get the message &#8220;… no listening sockets available, shutting down&#8221;? Ans: Apache by default will look for the port 80. If it is occupied by someother application , then this error will come. 9. What’s the command to stop [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p>This is the continuation to the Apache Interview Questions And Answers Part-2</p>
<p><strong>8. Why do I get the message &#8220;… no listening sockets available, shutting down&#8221;?</strong><br />
<strong>Ans: </strong>Apache by default will look for the port 80. If it is occupied by someother application , then  this error will come.</p>
<p><strong>9. What’s the command to stop Apache?./usr/local/sbin/apachectl -k stop</strong></p>
<p><strong>10. On a fresh install, why does Apache have three config files &#8211; srm.conf, access.conf and httpd.conf?</strong><br />
<strong>Ans: </strong>The first two are remnants from the NCSA times, and generally you should be ok if you delete the first two, and stick with httpd.conf<br />
Apache&#8217;s configuration files reside in the directory /etc/apache. For historical reasons that no longer apply, Apache has three configuration files:<br />
access.conf :<br />
Specifies what hosts and users are allowed access to what documents and services<br />
httpd.conf :<br />
Specifies options that govern the operation of the httpd daemon<br />
srm.conf :<br />
Specifies how your server&#8217;s documents and organized and formatted</p>
<p align="center"></p>
<p><strong>11. When I do ps -aux, why do I have one copy of httpd running as root and the rest as nouser?</strong><br />
<strong>Ans: </strong>You need to be a root to attach yourself to any Unix port below 1024, and we need 80.</p>
<p><strong>12. How do you set up a virtual host in Apache?</strong></p>
<p><strong>13. How you will debug apache  if your page is visible but blank. what may be the problem.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Interview Questions And Answers Part-2</title>
		<link>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-2/</link>
		<comments>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-2/#comments</comments>
		<pubDate>Fri, 06 Jul 2012 04:40:00 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6544</guid>
		<description><![CDATA[This is the continuation to the Apache Interview Questions And Answers Part-1 4. How do you check for the httpd.conf consistency and any errors in it? apachectl configtest 5. What is mod_vhost_alias? Ans: This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p>This is the continuation to the Apache Interview Questions And Answers Part-1</p>
<p><strong>4. How do you check for the httpd.conf consistency and any errors in it? apachectl configtest</strong></p>
<p><strong>5. What is mod_vhost_alias?</strong><br />
<strong>Ans:</strong> This module creates dynamically configured virtual hosts, by allowing the IP address and/or the Host: header of the HTTP request to be used as part of the pathname to determine what files to serve. This allows for easy use of a huge number of virtual hosts with similar configurations.<br />
Ref also: http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html</p>
<p><strong>6. What does htpasswd do?</strong><br />
<strong>Ans:</strong> htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. If htpasswd cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes.</p>
<p align="center"></p>
<p><strong>7. If you specify both deny from all and allow from all, what will be the default action of Apache?</strong><br />
<strong>Ans:</strong> It depends on the “Order” directive setup. See the below explanation and also you can refer the below link: http://httpd.apache.org/docs/1.3/mod/mod_access.html<br />
In the next example, all hosts in the apache.org domain are allowed access, except for the hosts which are in the foo.apache.org subdomain, who are denied access. All hosts not in the apache.org domain are denied access because the default state is to Deny access to the server.<br />
Order Allow,Deny<br />
Allow from apache.org<br />
Deny from foo.apache.org<br />
On the other hand, if the Order in the last example is changed to Deny,Allow, all hosts will be allowed access. This happens because, regardless of the actual ordering of the directives in the configuration file, the Allow from apache.org will be evaluated last and will override the Deny from foo.apache.org. All hosts not in the apache.org domain will also be allowed access because the default state is Allow.<br />
The presence of an Order directive can affect access to a part of the server even in the absence of accompanying Allow and Deny directives because of its effect on the default access state. For example,</p>
<p>&lt;Directory /www&gt;<br />
Order Allow,Deny<br />
&lt;/Directory&gt;</p>
<p>will Deny all access to the /www directory because the default access state is set to Deny.</p>
<p><a title="Apache Interview Questions And Answers Part-3" href="http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-3/">Apache Interview Questions And Answers Part-3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Interview Questions And Answers Part-1</title>
		<link>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-1-2/</link>
		<comments>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-1-2/#comments</comments>
		<pubDate>Fri, 06 Jul 2012 04:31:04 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6540</guid>
		<description><![CDATA[1. Which is the configuration file used in apache? Ans: httpd.conf 2. Explain keepalive directive in detail Ans: The KeepAlive directive allows multiple requests to be sent over the same TCP connection. This is particularly useful while serving HTML pages with lot of images. If KeepAlive is set to off, then for each images, a [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p><strong>1. Which is the configuration file used in apache?</strong><br />
<strong>Ans:</strong> httpd.conf</p>
<p><strong>2.  Explain  keepalive directive in detail</strong><br />
<strong>Ans:</strong> The KeepAlive directive allows multiple requests to be sent over the same TCP connection. This is particularly useful while serving HTML pages with lot of images. If KeepAlive is set to off, then for each images, a separate TCP connection has to be made. Overhead due to establishing TCP connection can be eliminated by turning On KeepAlive.<br />
KeepAliveTimeout determines how long to wait for the next request. Set this to a low value, perhaps between two to five seconds. If it is set too high, child processed are tied up waiting for the client when they could be used for serving new clients.<br />
By default Keepalive is set to off. If Keepalive is set to on and the server becomes very busy, the server can quickly spawn the maximum number of child processes. In this situation, the server will slow down significantly. If Keepalive is enabled, it is a good idea to set the the KeepAliveTimeout low and monitor the /var/log/httpd/error_log log file on the server. This log reports when the server is running out of child processes. </p>
<p align="center"></p>
<p><strong>3.  What is compressed header in Apache? How to implement?</strong><br />
<strong>Ans:</strong> HTTP compression is completely specified in HTTP/1.1. The server uses gzip or deflate encoding method to the response payload before it is sent to the client. Client then decompresses the payload. There is no need to install any additional software at the client side since all major browsers support this. Using compression will save bandwidth and improve response time, studies have found a mean compression gain of 75.2 % [5]. HTTP Compression can be enabled in Apache using mod_deflate module. Payload is compressed only if the browser requests compression, otherwise uncompressed content is served. A compression aware browser inform the server that it prefers compressed content through the HTTP request header &#8211; &#8220;Accept-Encoding: gzip,deflate&#8221;. Then the server responds with compressed payload and the response header set to<br />
Content-Encoding:gzip</p>
<p><a title="Apache Interview Questions And Answers Part-2" href="http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-2/">Apache Interview Questions And Answers Part-2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/06/apache-interview-questions-and-answers-part-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is rewrite rule? How it can be achieved? What is the benefit of URL rewriting?</title>
		<link>http://codershelpdesk.com/2012/07/05/what-is-rewrite-rule-how-it-can-be-achieved-what-is-the-benefit-of-url-rewriting/</link>
		<comments>http://codershelpdesk.com/2012/07/05/what-is-rewrite-rule-how-it-can-be-achieved-what-is-the-benefit-of-url-rewriting/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 15:44:34 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6536</guid>
		<description><![CDATA[What is rewrite rule? How it can be achieved? What is the benefit of URL rewriting? Ans: This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p><strong> What is rewrite rule? How it can be achieved? What is the benefit of URL rewriting?</strong><br />
<strong>Ans:</strong> This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to provide a really flexible and powerful URL manipulation mechanism.<br />
<strong>Configuration Directives</strong><br />
• RewriteEngine  &#8211; The RewriteEngine directive enables or disables the runtime rewriting engine.<br />
• RewriteOptions &#8211; The RewriteOptions directive sets some special options for the current per-server or per-directory configuration.<br />
• RewriteLog &#8211; The RewriteLog directive sets the name of the file to which the server logs any rewriting actions it performs.<br />
• RewriteLogLevel &#8211; The RewriteLogLevel directive sets the verbosity level of the rewriting logfile. The default level 0 means no logging, while 9 or more means that practically all actions are logged.<br />
• RewriteLock &#8211; This directive sets the filename for a synchronization lockfile which mod_rewrite needs to communicate with RewriteMap programs.<br />
• RewriteMap &#8211; The RewriteMap directive defines a Rewriting Map which can be used inside rule substitution strings by the mapping-functions to insert/substitute fields through a key lookup.<br />
• RewriteBase &#8211; The RewriteBase directive explicitly sets the base URL for per-directory rewrites.<br />
• RewriteCond &#8211; The RewriteCond directive defines a rule condition. Precede a RewriteRule directive with one or more RewriteCond directives.<br />
• RewriteRule &#8211; The RewriteRule directive is the real rewriting workhorse. The directive can occur more than once. Each directive then defines one single rewriting rule. The definition order of these rules is important, because this order is used when applying the rules at run-time.<br />
Eg: RewriteRule ^/info/([^/]+)/([^/]+)$ /cgi-bin/cardinfo?$2+$1<br />
<strong>What is multithreading?</strong><br />
Multi-threading is the most notable new capability of Apache 2.0, and the most directly related to scalability. Apache 1.3 is not multi-threaded, except on the Windows platform.<br />
The multithreaded versus single-threaded distinction merits some explanation. System administration is concerned with the allocation of resources to processes, and tools are provided for this purpose. For instance, the &#8220;renice&#8221; command can be used to increase or decrease the priority of a particular process, making it execute slower or faster. However, &#8220;manually setting process priorities is becoming a thing of the past&#8221; (Unix System Administration Handbook, 3rd. Ed., pg 52). Today, optimizing I/O (input/output), managing data, and interacting with users consume most of an administrator&#8217;s time. Nevertheless, most administrators are familiar with processes, while threads can seem conceptually alien.<br />
From the administrator&#8217;s vantage point (not the programmer&#8217;s), a thread is a process-within-a-process. Multiple threads reside within a single process. Threading has several advantages:</p>
<p align="center"></p>
<p>• Resources (memory, etc.) can be shared between threads.<br />
• Multiple threads can execute simultaneously.<br />
• Environment variables can be shared and manipulated by several threads because no thread is the parent of another. By contrast, a child process cannot affect the environment of its parent.<br />
Since few tools are available to manipulate threads, they are almost completely insulated against administrator intervention, but their presence or absence affects the behavior and design of an application. In Apache 1.3&#8242;s case, the lack of multiple threads means that a separate process must be used to respond to each incoming request. This approach has an obvious advantage over Web servers that use a single process to respond to all requests: If the Internet Information Server (IIS) process dies on a Windows Web server, no further requests are served until the process is restarted. If a single Apache process dies, only the request being served by that process is affected.<br />
However, multiple processes require more system resources. Twenty Apache 1.3 processes require 20 times as much memory. Also, if there are insufficient servers to handle a sudden spike in the number of requests, additional servers must be created using the fork system call. On some UNIX systems such as AIX (which displays its mainframe heritage in this respect), the creation of additional processes via fork is very expensive and can significantly delay a Web server&#8217;s response time. For large Apache 1.3 sites, then, performance tuning becomes a matter of balancing the number of available Apache processes. The administrator must ensure that enough processes are available to handle incoming requests without forking new ones, but not so many that the system hits resource limits. Several directives in the Apache configuration file accomplish this:<br />
• The MaxClients setting limits the number of Apache processes that will be created. Typically, memory is the limitation on this setting. If your Apache process takes up 20 MB of memory, and you have 1000MB of free RAM, you could have up to 50 Apache processes (1000MB/20MB = 50).<br />
• The MinSpareServers and MaxSpareServers settings keep a number of processes waiting around, to avoid the delay imposed by forking a new process. New processes are forked continually to keep the number of available servers between these thresholds, but incoming HTTP requests do not have to wait for processes to be forked because spares are available.<br />
Apache 2.0 is multithreaded, allowing a single Apache process to respond to multiple requests. This vastly increases Apache&#8217;s scalability. Unlike many multithreaded applications, Apache 2.0 even allows the administrator the ability to manipulate the threads within each process, to an extent. To account for differences between platforms, while retaining the reliability of multiple processes, Apache 2.0 provides several different models for controlling Apache processes and threads in the form of Multi-Processing Modules (MPMs):<br />
• The prefork MPM replicates the single-threaded behavior of Apache 1.3. This is the default MPM for UNIX systems.<br />
• The worker MPM &#8220;implements a hybrid multithreaded multi-process Web server.&#8221; Several processes are started, each with a fixed number of threads. Processes are started or stopped as necessary to regulate the total number of threads.<br />
• The perchild MPM regulates the total number of threads by varying the number of threads in each process. This MPM also allows Apache processes to operate as multiple user IDs, which can be useful for managing several virtual hosts.<br />
• Other MPMs are provided for specific operating systems, including BeOS, Netware and Windows NT.<br />
For any Web server, the parameter you need to regulate is the number of simultaneous incoming requests that will be served. In Apache 1.3, simultaneous requests corresponded to an equivalent number of processes, thus, processes required regulation. In Apache 2.0, threads are the metric.</p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/05/what-is-rewrite-rule-how-it-can-be-achieved-what-is-the-benefit-of-url-rewriting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is virtual host? List various kinds to create a virtual host? How do you set up a virtual host in Apache?</title>
		<link>http://codershelpdesk.com/2012/07/05/what-is-virtual-host-list-various-kinds-to-create-a-virtual-host-how-do-you-set-up-a-virtual-host-in-apache/</link>
		<comments>http://codershelpdesk.com/2012/07/05/what-is-virtual-host-list-various-kinds-to-create-a-virtual-host-how-do-you-set-up-a-virtual-host-in-apache/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 15:33:46 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6530</guid>
		<description><![CDATA[6. What is virtual host? List various kinds to create a virtual host? How do you set up a virtual host in Apache? Ans: The term Virtual Host refers to the practice of maintaining more than one server on one machine, as differentiated by their apparent hostname. For example, it is often desirable for companies [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p><strong>6. What is virtual host? List various kinds to create a virtual host? How do you set up a virtual host in Apache?</strong><br />
<strong>Ans:</strong> The term Virtual Host refers to the practice of maintaining more than one server on one machine, as differentiated by their apparent hostname. For example, it is often desirable for companies sharing a web server to have their own domains, with web servers accessible as www.company1.com and www.company2.com, without requiring the user to know any extra path information.<br />
<strong>IP Based Virtual Hosting:</strong><br />
IP-based virtual hosts use the IP address of the connection to determine the correct virtual host to serve. Therefore you need to have a separate IP address for each host.<br />
<strong>Name Based Virtual Host:</strong><br />
With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.<br />
Name-based virtual hosting is usually simpler, since you need only configure your DNS server to map each hostname to the correct IP address and then configure the Apache HTTP Server to recognize the different hostnames. Name-based virtual hosting also eases the demand for scarce IP addresses. Therefore you should use name-based virtual hosting unless there is a specific reason to choose IP-based virtual hosting. Some reasons why you might consider using </p>
<p><strong>IP-based virtual hosting:</strong><br />
• Some ancient clients are not compatible with name-based virtual hosting. For name-based virtual hosting to work, the client must send the HTTP Host header. This is required by HTTP/1.1, and is implemented by all modern HTTP/1.0 browsers as an extension. If you need to support obsolete clients and still use name-based virtual hosting, a possible technique is discussed at the end of this document.<br />
• Name-based virtual hosting cannot be used with SSL secure servers because of the nature of the SSL protocol.<br />
• Some operating systems and network equipment implement bandwidth management techniques that cannot differentiate between hosts unless they are on separate IP addresses.</p>
<p align="center"></p>
<p><strong>Name Based Virtual Host Example</strong><br />
suppose that you are serving the domain www.domain.tld and you wish to add the virtual host www.otherdomain.tld, which points at the same IP address. Then you simply add the following to httpd.conf:</p>
<p>NameVirtualHost *<br />
&lt;VirtualHost *&gt;<br />
ServerName www.domain.tld<br />
DocumentRoot /www/domain<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;VirtualHost *&gt;<br />
ServerName www.otherdomain.tld<br />
DocumentRoot /www/otherdomain<br />
&lt;/VirtualHost&gt;</p>
<p><strong>IP Based Virtual Host Example:</strong><br />
The server has two IP addresses (172.20.30.40 and 172.20.30.50) which resolve to the names www.example1.com and www.example2.org respectively.<br />
Server configuration<br />
Listen 80</p>
<p>&lt;VirtualHost 172.20.30.40&gt;<br />
DocumentRoot /www/example1<br />
ServerName www.example1.com<br />
&lt;/VirtualHost&gt;<br />
&lt;VirtualHost 172.20.30.50&gt;<br />
DocumentRoot /www/example2<br />
ServerName www.example2.org<br />
&lt;/VirtualHost&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/05/what-is-virtual-host-list-various-kinds-to-create-a-virtual-host-how-do-you-set-up-a-virtual-host-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize Apache for better performance? (Performance Tuning)</title>
		<link>http://codershelpdesk.com/2012/07/05/how-to-optimize-apache-for-better-performance-performance-tuning/</link>
		<comments>http://codershelpdesk.com/2012/07/05/how-to-optimize-apache-for-better-performance-performance-tuning/#comments</comments>
		<pubDate>Thu, 05 Jul 2012 13:01:54 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6517</guid>
		<description><![CDATA[3. How to optimize Apache for better performance? (Performance Tuning) Ans: 1. Apache server performance Apache server performance can be improved by adding additional hardware resources such as RAM, faster CPU etc. But, most of the time, the same result can be achieved by custom configuration of the server. This article looks into getting maximum [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p><strong>3. How to optimize Apache for better performance? (Performance Tuning)</strong><br />
<strong>Ans:</strong> <strong>1. Apache server performance</strong><br />
Apache server performance can be improved by adding additional hardware resources such as RAM, faster CPU etc. But, most of the time, the same result can be achieved by custom configuration of the server. This article looks into getting maximum performance out of Apache with the existing hardware resources, specifically on the Linux systems. Of course, it is assumed that there are enough hardware resources, especially enough RAM that the server isn&#8217;t swapping frequently. First two sections look into various Compile-Time and Run-Time configuration options. Run-Time section assumes that Apache is compiled with prefork MPM. HTTP compression and caching is discussed next. Finally, using separate servers for serving static and dynamic contents are being discussed. Basic knowledge of compiling and configuring Apache, and Linux are assumed.<br />
<strong>2. Compile-Time Configuration Options</strong><br />
<strong>2.1  Load only the required modules:</strong><br />
The Apache HTTP Server is a modular program where the administrator can choose the functionality to include in the server by selecting a set of modules . The modules can be either statically compiled to the httpd binary or else can be compiled as Dynamic Shared Objects (DSOs). DSO modules can be either compiled when the server is built or else can use the apxs utility to compile and add at a later date. The module mod_so must be statically compiled into the Apache core to enable DSO support.<br />
Run apache with only the required modules. This reduces the memory footprint and hence the server performance. Statically compiling modules will save RAM that&#8217;s used for supporting dynamically loaded modules, but one has to recompile Apache whenever a module is to be added or dropped. This is where the DSO mechanism comes handy. Once the mod_so module is statically compiled, any other module can be added or dropped using the LoadModule command in httpd.conf file &#8211; of course, you will have to compile the modules using apxs if it wasn&#8217;t compiled when the server was built.<br />
 <strong>2.2 Choose appropriate MPM: </strong><br />
Apache server ships with a selection of Multi-Processing Modules (MPMs) which are responsible for binding to network ports on the machine, accepting requests, and dispatching children to handle the requests . Only one MPM can be loaded into the server at any time.<br />
<strong>3 Run-Time Configuration Options </strong><br />
<strong>3.1 DNS lookup: </strong><br />
The HostnameLookups directive enables DNS lookup so that hostnames can be logged instead of the IP address. This adds latency to every request since the DNS lookup has to be completed before the request is finished. HostnameLookups is Off by default in Apache 1.3 and above. Leave it Off and use post-processing program such as logresolve to resolve IP addresses in Apache&#8217;s access logfiles. Logresolve ships with Apache.<br />
When using Allow from or Deny from directives, use IP address instead of a domain name or a hostname. Otherwise a double DNS lookup is performed to make sure that the domain name or the hostname is not being spoofed.<br />
<strong>3.2 AllowOverride:</strong><br />
If AllowOverride is not set to &#8216;None&#8217;, then Apache will attempt to open .htaccess file (as specified by AccessFileName directive) in each directory that it visits.<br />
<strong>3.3 FollowSymLinks and SymLinksIfOwnerMatch: </strong><br />
If FollowSymLinks option is set, then the server will follow symbolic links in this directory. If SymLinksIfOwnerMatch is set, then the server will follow symbolic links only if the target file or directory is owned by the same user as the link.<br />
If SymLinksIfOwnerMatch is set, then Apache will have to issue additional system calls to verify whether the ownership of the link and the target file match. Additional system calls are also needed when FollowSymLinks is NOT set.<br />
<strong>3.4 Content Negotiation:</strong><br />
Avoid content negotiation for fast response. If content negotiation is required for the site, use type-map files rather than Options MultiViews directive. With MultiViews, Apache has to scan the directory for files, which add to the latency. </p>
<p align="center"></p>
<p><strong>3.5 MaxClients: </strong><br />
The MaxClients sets the limit on maximum simultaneous requests that can be supported by the server. No more than this much number of child processes are spawned. It shouldn&#8217;t be set too low such that new connections are put in queue, which eventually time-out and the server resources are left unused. Setting this too high will cause the server to start swapping and the response time will degrade drastically. Appropriate value for MaxClients can be calculated as: MaxClients = Total RAM dedicated to the web server / Max child process size &#8212;- [4] Child process size for serving static file is about 2-3M.<br />
<strong>3.6 MinSpareServers, MaxSpareServers, and StartServers: </strong><br />
MaxSpareServers and MinSpareServers determine how many child processes to keep while waiting for requests. If the MinSpareServers is too low and a bunch of requests come in, then Apache will have to spawn additional child processes to serve the requests. Creating child processes is relatively expensive. If the server is busy creating child processes, it won&#8217;t be able to serve the client requests immediately. MaxSpareServers shouldn&#8217;t be set too high, it can cause resource problems since the child processes consume resources.<br />
Tune MinSpareServers and MaxSpareServers such that Apache need not frequently spwan more than 4 child processes per second (Apache can spwan a maximum of 32 child processes per second). When more than 4 children are spawned per second, a message will be logged in the ErrorLog.<br />
The StartServers directive sets the number of child server processes created on startup. Apache will continue creating child process until the MinSpareServers setting is reached. Doesn&#8217;t have much effect on performance if the server isn&#8217;t restarted frequently. If there are lot of requests and Apache is restarted frequently, set this to a relatively high value.<br />
<strong>3.7 MaxRequestsPerChild: </strong><br />
The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child server process will handle. After MaxRequestsPerChild requests, the child process will die. It&#8217;s set to 0 by default, that means the child process will never expire. It is appropriate to set this to a value of few thousands. This can help prevent memory leakage since the process dies after serving a certain number of requests. Do not set this too low, since creating new processes does have overhead.<br />
<strong>3.8 KeepAlive and KeepAliveTimeout: </strong><br />
The KeepAlive directive allows multiple requests to be sent over the same TCP connection. This is particularly useful while serving HTML pages with lot of images. If KeepAlive is set to Off, then for each images, a separate TCP connection has to be made. Overhead due to establishing TCP connection can be eliminated by turning On KeepAlive.<br />
KeepAliveTimeout determines how long to wait for the next request. Set this to a low value, perhaps between two to five seconds. If it is set too high, child processed are tied up waiting for the client when they could be used for serving new clients.<br />
<strong>4 HTTP Compressions &#038; Caching </strong><br />
HTTP compression is completely specified in HTTP/1.1. The server uses gzip or deflate encoding method to the response payload before it is sent to the client. Client then decompresses the payload. There is no need to install any additional software at the client side since all major browsers support this. Using compression will save bandwidth and improve response time, studies have found a mean compression gain of 75.2 % [5]. HTTP Compression can be enabled in Apache using mod_deflate module. Payload is compressed only if the browser requests compression, otherwise uncompressed content is served. A compression aware browser inform the server that it prefers compressed content through the HTTP request header &#8211; &#8220;Accept-Encoding: gzip,deflate&#8221;. Then the server responds with compressed payload and the response header set to<br />
<strong>Content-Encoding:gzip</strong><br />
In caching, a copy of the data is stored at the client or in a proxy server so that it need not be retrieved frequently from the server. This will save bandwidth, decrease load on the server and reduce latency. Cache control is done through HTTP headers. In Apache, this can be accomplished through mod_expires and mod_headers modules. Also there is server side caching, in which the frequently accessed contents are stored in memory so that it can be served fast. The module mod_cache can be used for server side caching, it is production stable in Apache version 2.2.<br />
<strong>5. Separate server for static and dynamic content </strong><br />
Apache processes serving dynamic content takes about 3M to 20M of RAM. It grows to accommodate the content it&#8217;s serving and never decreases until the process dies. Say an Apache process grows to 20M to serve a dynamic content. After completing the request, it is free to serve any other request. If a request for an image comes in, then this 20M process is serving a static content which could as well be served by a 1M process. Memory is used inefficiently.</p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/05/how-to-optimize-apache-for-better-performance-performance-tuning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are the difference between Apache?</title>
		<link>http://codershelpdesk.com/2012/07/04/apache-interview-questions-and-answers-part-1/</link>
		<comments>http://codershelpdesk.com/2012/07/04/apache-interview-questions-and-answers-part-1/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 16:06:53 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Apache Interview Questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6514</guid>
		<description><![CDATA[1. What are the difference between Apache1.2 and Apache2? Ans: New features in apache 2 Core Enhancements Unix Threading On Unix systems with POSIX threads support, Apache can now run in a hybrid multiprocess, multithreaded mode. This improves scalability for many, but not all configurations. New Build System The build system has been rewritten from [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p><strong>1. What are the difference between Apache1.2 and Apache2?</strong><br />
<strong>Ans: </strong>New features in apache 2<br />
<strong>Core Enhancements</strong><br />
<strong>Unix Threading</strong><br />
On Unix systems with POSIX threads support, Apache can now run in a hybrid multiprocess, multithreaded mode. This improves scalability for many, but not all configurations.<br />
<strong>New Build System</strong><br />
The build system has been rewritten from scratch to be based on autoconf and libtool. This makes Apache&#8217;s configuration system more similar to that of other packages.<br />
<strong>Multiprotocol Support</strong><br />
Apache now has some of the infrastructure in place to support serving multiple protocols. mod_echo has been written as an example.<br />
<strong>Better support for non-Unix platforms</strong><br />
Apache 2.0 is faster and more stable on non-Unix platforms such as BeOS, OS/2, and Windows. With the introduction of platform-specific multi-processing modules (MPMs) and the Apache Portable Runtime (APR), these platforms are now implemented in their native API, avoiding the often buggy and poorly performing POSIX-emulation layers.<br />
<strong>New Apache API</strong><br />
The API for modules has changed significantly for 2.0. Many of the module-ordering/-priority problems from 1.3 should be gone. 2.0 does much of this automatically, and module ordering is now done per-hook to allow more flexibility. Also, new calls have been added that provide additional module capabilities without patching the core Apache server.<br />
<strong>IPv6 Support</strong><br />
On systems where IPv6 is supported by the underlying Apache Portable Runtime library, Apache gets IPv6 listening sockets by default. Additionally, the Listen, NameVirtualHost, and VirtualHost directives support IPv6 numeric address strings (e.g., &#8220;Listen [2001:db8::1]:8080&#8243;).<br />
<strong>Filtering</strong><br />
Apache modules may now be written as filters which act on the stream of content as it is delivered to or from the server. This allows, for example, the output of CGI scripts to be parsed for Server Side Include directives using the INCLUDES filter in mod_include. The module mod_ext_filter allows external programs to act as filters in much the same way that CGI programs can act as handlers.<br />
<strong>Multilanguage Error Responses</strong><br />
Error response messages to the browser are now provided in several languages, using SSI documents. They may be customized by the administrator to achieve a consistent look and feel.<br />
<strong>Simplified configuration</strong><br />
Many confusing directives have been simplified. The often confusing Port and BindAddress directives are gone; only the Listen directive is used for IP address binding; the ServerName directive specifies the server name and port number only for redirection and vhost recognition.<br />
<strong>Native Windows NT Unicode Support</strong><br />
Apache 2.0 on Windows NT now uses utf-8 for all filename encodings. These directly translate to the underlying Unicode file system, providing multilanguage support for all Windows NT-based installations, including Windows 2000 and Windows XP. This support does not extend to Windows 95, 98 or ME, which continue to use the machine&#8217;s local codepage for filesystem access.<br />
Regular Expression Library Updated<br />
Apache 2.0 includes the Perl Compatible Regular Expression Library (PCRE). All regular expression evaluation now uses the more powerful Perl 5 syntax.<br />
Module Enhancements</p>
<p align="center"></p>
<p><strong>mod_ssl</strong><br />
New module in Apache 2.0. This module is an interface to the SSL/TLS encryption protocols provided by OpenSSL.<br />
<strong>mod_dav</strong><br />
New module in Apache 2.0. This module implements the HTTP Distributed Authoring and Versioning (DAV) specification for posting and maintaining web content.<br />
<strong>mod_deflate</strong><br />
New module in Apache 2.0. This module allows supporting browsers to request that content be compressed before delivery, saving network bandwidth.<br />
<strong>mod_auth_ldap</strong><br />
New module in Apache 2.0.41. This module allows an LDAP database to be used to store credentials for HTTP Basic Authentication. A companion module, mod_ldap provides connection pooling and results caching.<br />
<strong>mod_auth_digest</strong><br />
Includes additional support for session caching across processes using shared memory.<br />
<strong>mod_charset_lite</strong><br />
New module in Apache 2.0. This experimental module allows for character set translation or recoding.<br />
<strong>mod_file_cache</strong><br />
New module in Apache 2.0. This module includes the functionality of mod_mmap_static in Apache 1.3, plus adds further caching abilities.<br />
<strong>mod_headers</strong><br />
This module is much more flexible in Apache 2.0. It can now modify request headers used by mod_proxy, and it can conditionally set response headers.<br />
<strong>mod_proxy</strong><br />
The proxy module has been completely rewritten to take advantage of the new filter infrastructure and to implement a more reliable, HTTP/1.1 compliant proxy. In addition, new <Proxy> configuration sections provide more readable (and internally faster) control of proxied sites; overloaded <Directory "proxy:..."> configuration are not supported. The module is now divided into specific protocol support modules including proxy_connect, proxy_ftp and proxy_http.<br />
<strong>mod_negotiation</strong><br />
A new ForceLanguagePriority directive can be used to assure that the client receives a single document in all cases, rather than NOT ACCEPTABLE or MULTIPLE CHOICES responses. In addition, the negotiation and MultiViews algorithms have been cleaned up to provide more consistent results and a new form of type map that can include document content is provided.<br />
<strong>mod_autoindex</strong><br />
Autoindex&#8217;ed directory listings can now be configured to use HTML tables for cleaner formatting, and allow finer-grained control of sorting, including version-sorting, and wildcard filtering of the directory listing.<br />
mod_<strong>include</strong><br />
New directives allow the default start and end tags for SSI elements to be changed and allow for error and time format configuration to take place in the main configuration file rather than in the SSI document. Results from regular expression parsing and grouping (now based on Perl&#8217;s regular expression syntax) can be retrieved using mod_include&#8217;s variables $0 .. $9.<br />
<strong>mod_auth_dbm</strong><br />
Now supports multiple types of DBM-like databases using the AuthDBMType directive.</p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/04/apache-interview-questions-and-answers-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Interview Questions And Answers Part-18</title>
		<link>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-18/</link>
		<comments>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-18/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 14:08:35 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Javascript interview questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6509</guid>
		<description><![CDATA[This is the continuation to the javascript Interview Questions And Answers Part-17 46. Describe in detail how you would insert a new div element into the bottom of the body tag ? Answer:Newdiv = document.createElement(&#8220;div&#8221;); Newtext = document.createTextNode(&#8220;This is the new text elements in a div&#8221;); newdiv.appentChild(Newtext); rootData = document.getElementsByTagName(&#8220;body&#8221;)[0]; rootData.appentChild(newdiv); 47. What is inheritance [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p>This is the continuation to the javascript Interview Questions And Answers Part-17</p>
<p><strong>46. Describe in detail how you would insert a new div element into the bottom of the body tag ?</strong><br />
<strong>Answer:</strong>Newdiv = document.createElement(&#8220;div&#8221;);<br />
Newtext = document.createTextNode(&#8220;This is the new text elements in a div&#8221;);<br />
newdiv.appentChild(Newtext);<br />
rootData = document.getElementsByTagName(&#8220;body&#8221;)[0];<br />
rootData.appentChild(newdiv);</p>
<p><strong>47. What is inheritance in JavaScript?</strong><br />
<strong>Answer:</strong>In javascript inheritance is possible with prototype. Prototype is a type of inheritance in JavaScript. We use it when we would like an object to inherit a method after it has been defined. Think of prototyping mentally as &#8220;attaching&#8221; a method to an object after it&#8217;s been defined, in which all object instances then instantly share.<br />
Lets extend our original cat() object above with an additional method to change the cat&#8217;s name, using prototype:<br />
Code:</p>
<p>&lt;script language=&#8221;javascript&#8221; type=&#8221;text/javascript&#8221;&gt;<br />
&lt;!&#8211;<br />
cat.prototype.changeName = function(name) {<br />
this.name = name;<br />
}<br />
firstCat = new cat(&#8220;pursur&#8221;)<br />
firstCat.changeName(&#8220;Bill&#8221;)<br />
firstCat.talk() //alerts &#8220;Bill says meeow!&#8221;<br />
//&#8211;&gt;<br />
&lt;/script&gt;</p>
<p align="center"></p>
<p><strong>For instance: </strong><br />
Date.prototype.getAustralianDate = function() {<br />
return (this.getDate() + &#8216;/&#8217;<br />
+ this.getMonth() + &#8216;/&#8217;<br />
+ this.getFullYear());<br />
}<br />
Date.prototype.getAmericanDate = function() {<br />
return (this.getMonth() + &#8216;/&#8217;<br />
+ this.getDate() + &#8216;/&#8217;<br />
+ this.getFullYear());<br />
}<br />
<strong>And to test it: </strong><br />
d = new Date();<br />
alert(d.getAustralianDate() + &#8220;\n&#8221; + d.getAmericanDate());</p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-18/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Interview Questions And Answers Part-17</title>
		<link>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-17/</link>
		<comments>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-17/#comments</comments>
		<pubDate>Wed, 04 Jul 2012 14:01:39 +0000</pubDate>
		<dc:creator>Coders</dc:creator>
				<category><![CDATA[Interview Questions]]></category>
		<category><![CDATA[Javascript interview questions]]></category>

		<guid isPermaLink="false">http://codershelpdesk.com/?p=6505</guid>
		<description><![CDATA[This is the continuation to the javascript Interview Questions And Answers Part-16 42. Can you create one class and create an object out of that? Ans: Based on this class asked:- a. What is the use of var? b. Why ‘this’ keyword is used for? c. How can you access the class method? d. What [...]]]></description>
			<content:encoded><![CDATA[<p align="center"></p>
<p>This is the continuation to the javascript Interview Questions And Answers Part-16</p>
<p><strong>42. Can you create one class and create an object out of that?</strong><br />
<strong>Ans:</strong> Based on this class asked:-<br />
a. What is the use of var?<br />
b. Why ‘this’ keyword is used for?<br />
c. How can you access the class method?<br />
d. What will happen if you declare a variable without var or this?</p>
<p><strong>43. How is that you can insert a row into table?</strong><br />
<strong>Answer:</strong> The insertRow() method is used to insert a new row at the specified position in a table.<br />
tableObject.insertRow(index)</p>
<p align="center"></p>
<p><strong>44. Would you describe JavaScript as a procedural language or an object-oriented language? Why?</strong><br />
<strong>Answer:</strong> Javascript is an object-oriented language. Its will support all OOPS concepts like class, objects, inheritance, function overloading, etc.</p>
<p><strong>45.  What is event delegation? When is it useful?</strong><br />
<strong>Answer:</strong> Event delegation involves attaching event handler to parent DOM element. Reason is simple: when an event is triggered on an element, the same event is also triggered on all of that element’s ancescors. Event bubbles up from the most nested element (e.g. button) to the root of the DOM (e.g. window); this process is known as event bubbling.</p>
<p><a title="Javascript Interview Questions And Answers Part-18" href="http://codershelpdesk.com/2012/07/04/Javascript-interview-questions-and-answers-part-18/">Javascript Interview Questions And Answers Part-18</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codershelpdesk.com/2012/07/04/javascript-interview-questions-and-answers-part-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
