tag:blogger.com,1999:blog-71067865038861305412024-03-13T13:10:05.137-07:00Pineapple Labs Blog<a href="http://www.pineapplelabs.in" alt="Pineapple Labs"> Pineapple Labs</a>Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-7106786503886130541.post-11059823800275805052017-11-11T08:07:00.003-08:002017-11-11T08:07:48.668-08:00How to configure the C3P0 connection pool in Hibernate<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="note">
<strong>Connection Pool</strong><br />
Connection pool is good for performance, as it prevents Java application
create a connection each time when interact with database and minimizes
the cost of opening and closing connections.
See <a href="http://en.wikipedia.org/wiki/Connection_pool">wiki connection pool</a> explanation<br />
<br />
<br />
Hibernate comes with internal connection pool, but not suitable for
production use. In this tutorial, we show you how to integrate third
party connection pool – C3P0, with Hibernate.<br />
<br />
<h2>
1. Get hibernate-c3p0.jar </h2>
To integrate c3p0 with Hibernate, you need <strong>hibernate-c3p0.jar</strong>, get it from JBoss repository.<br />
<em>File : pom.xml</em><br />
<pre class=" language-markup"><code class=" language-markup"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>project</span> <span class="token attr-name">...</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>repositories</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>repository</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>id</span><span class="token punctuation">></span></span>JBoss repository<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>id</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>url</span><span class="token punctuation">></span></span>http://repository.jboss.org/nexus/content/groups/public/<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>url</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>repository</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>repositories</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependencies</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.hibernate<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>artifactId</span><span class="token punctuation">></span></span>hibernate-core<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>artifactId</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>version</span><span class="token punctuation">></span></span>3.6.3.Final<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>version</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>dependency</span><span class="token punctuation">></span></span>
<span class="token comment" spellcheck="true"><!-- Hibernate c3p0 connection pool --></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>dependency</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupId</span><span class="token punctuation">></span></span>org.hibernate<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupId</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>artifactId</span><span class="token punctuation">></span></span>hibernate-c3p0<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>artifactId</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>version</span><span class="token punctuation">></span></span>3.6.3.Final<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>version</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>dependency</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>dependencies</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>project</span><span class="token punctuation">></span></span></code></pre>
<pre class=" language-markup"><code class=" language-markup"><span class="token tag"><span class="token punctuation"> </span></span></code></pre>
<h2>
2. Configure c3p0 propertise </h2>
To configure c3p0, puts the c3p0 configuration details in “<strong>hibernate.cfg.xml</strong>“, like this :<br />
<em>File : hibernate.cfg.xml</em><br />
<code class=" language-markup"><span class="token prolog"><?xml version="1.0" encoding="utf-8"?></span>
<span class="token doctype"><!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>hibernate-configuration</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>session-factory</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.connection.driver_class<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>oracle.jdbc.driver.OracleDriver<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.connection.url<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>jdbc:oracle:thin:@localhost:1521:MKYONG<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.connection.username<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>mkyong<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.connection.password<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>password<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.dialect<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>org.hibernate.dialect.Oracle10gDialect<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.default_schema<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>MKYONG<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>show_sql<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>true<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.c3p0.min_size<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>5<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.c3p0.max_size<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>20<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.c3p0.timeout<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>300<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.c3p0.max_statements<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>50<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>hibernate.c3p0.idle_test_period<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>3000<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>property</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>mapping</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.mkyong.user.DBUser<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>mapping</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>session-factory</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>hibernate-configuration</span><span class="token punctuation">></span></span></code>
<ol>
<li>hibernate.c3p0.min_size – Minimum number of JDBC connections in the pool. Hibernate default: 1</li>
<li>hibernate.c3p0.max_size – Maximum number of JDBC connections in the pool. Hibernate default: 100</li>
<li>hibernate.c3p0.timeout – When an idle connection is removed from the pool (in second). Hibernate default: 0, never expire.</li>
<li>hibernate.c3p0.max_statements – Number of prepared statements will
be cached. Increase performance. Hibernate default: 0 , caching is
disable.</li>
<li>hibernate.c3p0.idle_test_period – idle time in seconds before a connection is automatically validated. Hibernate default: 0</li>
</ol>
<div class="note">
<strong>Note</strong><br />
For detail about <strong>hibernate-c3p0</strong> configuration settings, please read <a href="http://community.jboss.org/wiki/HowToConfigureTheC3P0ConnectionPool" target="_blank">this</a> article. </div>
<div class="note">
</div>
<div class="note">
<h2>
Run it, output</h2>
Done, run it and see the following output :<br />
<div class="pic">
<img alt="c3p0 connection pool in hibernate" class="alignnone size-full wp-image-8651" height="454" src="http://www.mkyong.com/wp-content/uploads/2009/12/hibernate-c3p0-connection-pool.png" title="hibernate-c3p0-connection-pool" width="640" />
</div>
During the connection initialize process, 5 database connections are
created in connection pool, ready reuse for your web application.<br />
<div class="download">
Download it – <a href="http://www.mkyong.com/wp-content/uploads/2009/12/Hibernate-C3P0-Connection-Pool-Example.zip">Hibernate-C3P0-Connection-Pool-Example.zip</a> (8KB)
</div>
<h2>
Reference</h2>
<ol>
<li><a href="http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#d0e1748" target="_blank">http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#d0e1748</a></li>
<li><a href="http://www.mchange.com/projects/c3p0/index.html#appendix_d" target="_blank">http://www.mchange.com/projects/c3p0/index.html#appendix_d</a></li>
<li>https://www.mkyong.com/hibernate/how-to-configure-the-c3p0-connection-pool-in-hibernate/ </li>
</ol>
</div>
<pre class=" language-markup"><code class=" language-markup"><span class="token tag"><span class="token punctuation"> </span></span></code></pre>
</div>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-79859780363717564952017-07-22T05:38:00.001-07:002017-07-22T05:38:12.803-07:00How to: Linux / UNIX create soft link with ln command<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Two types of links</h2>
There are two <a href="https://www.cyberciti.biz/tips/understanding-unixlinux-symbolic-soft-and-hard-links.html">types of links</a><br />
<ul>
<li><strong>symbolic links</strong>: Refer to a symbolic path indicating the abstract location of another file</li>
<li><strong>hard links</strong> : Refer to the specific location of physical data.</li>
</ul>
<h2>
How do I create soft link / symbolic link?</h2>
Soft
links are created with the ln command. For example, the following would
create a soft link named link1 to a file named file1, both in the
current directory<br /> <code>$ ln -s file1 link1</code><br /> To verify new soft link run:<br /> <code>$ ls -l file1 link1</code><br /> Sample outputs:<br />
<pre>-rw-r--r-- 1 veryv wheel 0 Mar 7 22:01 file1
lrwxr-xr-x 1 veryv wheel 5 Mar 7 22:01 link1 -> file1</pre>
From
the above outputs it is clear that a symbolic link named ‘link1’
contains the name of the file named ‘file1’ to which it is linked. So
the syntax is as follows to create a symbolic link in Unix or Linux, at
the shell prompt:<br /> <code>$ ln -s {<span style="color: #6666cc;">source-filename</span>} {<span style="color: #993399;">symbolic-filename</span>}<br /> </code><br />
For example create a softlink for
/webroot/home/httpd/test.com/index.php as /home/vivek/index.php, enter
the following command:<br /> <code>$ ln -s /webroot/home/httpd/test.com/index.php /home/vivek/index.php<br /> $ ls -l</code><br /> Sample outputs:<br />
<pre>lrwxrwxrwx 1 vivek vivek 16 2007-09-25 22:53 index.php -> /webroot/home/httpd/test.com/index.php</pre>
You can now edit the soft link named /home/vivek/index.php and /webroot/home/httpd/test.com/index.php will get updated:<br /> <code>$ vi /home/vivek/index.php</code><br />
Your actual file /webroot/home/httpd/test.com/index.php remains on
disk even if you deleted the soft link /home/vivek/index.php using the
rm command:<br /> <code>$ rm /home/vivek/index.php ## <strong><span style="color: red;"><--- link gone</span></strong> ##<br /> ## <strong><span style="color: #009900;">But original/actual file remains as it is</span></strong> ##<br /> $ ls -l /webroot/home/httpd/test.com/index.php </code></div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com1tag:blogger.com,1999:blog-7106786503886130541.post-11724244293460442632017-07-22T05:32:00.003-07:002017-07-22T05:32:26.742-07:00How to stop a domain name pointing to your website IP address<div dir="ltr" style="text-align: left;" trbidi="on">
<table><tbody>
<tr><td class="votecell"><div class="vote">
<br />
</div>
</td>
<td class="answercell">
<div class="post-text" itemprop="text">
You cannot have it refuse connections, since the hostname (or IP)
that the user is trying to use as their HTTP host is not known to the
server until the client actually sends an HTTP request. The TCP
listener is always bound to the IP address.<br />
Would an HTTP error response be acceptable instead?<br />
<br />
<pre><code><VirtualHost *:80>
ServerName catchall
<Location />
Order allow,deny
Deny from all
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/
<Directory /var/www/>
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
</code></pre>
</div>
</td></tr>
</tbody></table>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com2tag:blogger.com,1999:blog-7106786503886130541.post-27871649653044380472017-07-21T22:38:00.002-07:002017-07-21T22:38:23.069-07:00How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS <div dir="ltr" style="text-align: left;" trbidi="on">
<h1 class="content-title Tutorial-header">
<span class="meta-section timestamp"><span class="tutorial-date-text"></span><span class="tutorial-date"></span></span><span class="meta-section pageviews"><span class="icon icon-eye v-mid"></span><span class="views-count v-mid"></span><span class="sr-only"></span></span> <span class="meta-section tags"></span>Introduction
<span class="meta-section tags"></span></h1>
<div class="content-body tutorial-content tutorial-content-legacy" data-growable-markdown="">
The Apache web server is the most popular way of serving web content
on the internet. It accounts for more than half of all active websites
on the internet and is extremely powerful and flexible.<br />
Apache breaks its functionality and components into individual units
that can be customized and configured independently. The basic unit
that describes an individual site or domain is called a <code>virtual host</code>.<br />
These designations allow the administrator to use one server to host
multiple domains or sites off of a single interface or IP by using a
matching mechanism. This is relevant to anyone looking to host more
than one site off of a single VPS.<br />
Each domain that is configured will direct the visitor to a specific
directory holding that site's information, never indicating that the
same server is also responsible for other sites. This scheme is
expandable without any software limit as long as your server can handle
the load.<br />
In this guide, we will walk you through how to set up Apache virtual
hosts on an Ubuntu 14.04 VPS. During this process, you'll learn how to
serve different content to different visitors depending on which domains
they are requesting.<br />
<h2 id="prerequisites">
Prerequisites</h2>
Before you begin this tutorial, you should <a href="https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-14-04">create a non-root user</a> as described in steps 1-4 here.<br />
You will also need to have Apache installed in order to work through
these steps. If you haven't already done so, you can get Apache
installed on your server through <code>apt-get</code>:<br />
<pre class="code-pre "><code>sudo apt-get update
sudo apt-get install apache2
</code></pre>
After these steps are complete, we can get started.<br />
For the purposes of this guide, my configuration will make a virtual host for <code>example.com</code> and another for <code>test.com</code>. These will be referenced throughout the guide, but you should substitute your own domains or values while following along.<br />
To learn <a href="https://www.digitalocean.com/community/articles/how-to-set-up-a-host-name-with-digitalocean">how to set up your domain names with DigitalOcean</a>, follow this link. If you do <em>not</em> have domains available to play with, you can use dummy values.<br />
We will show how to edit your local hosts file later on to test the
configuration if you are using dummy values. This will allow you to
test your configuration from your home computer, even though your
content won't be available through the domain name to other visitors.<br />
<h2 id="step-one-—-create-the-directory-structure">
Step One — Create the Directory Structure</h2>
The first step that we are going to take is to make a directory
structure that will hold the site data that we will be serving to
visitors.<br />
Our <code>document root</code> (the top-level directory that Apache looks at to find content to serve) will be set to individual directories under the <code>/var/www</code> directory. We will create a directory here for both of the virtual hosts we plan on making.<br />
Within each of <em>these</em> directories, we will create a <code>public_html</code> folder that will hold our actual files. This gives us some flexibility in our hosting.<br />
For instance, for our sites, we're going to make our directories like this:<br />
<pre>sudo mkdir -p /var/www/<span class="highlight">example.com</span>/public_html
sudo mkdir -p /var/www/<span class="highlight">test.com</span>/public_html
</pre>
The portions in red represent the domain names that we are wanting to serve from our VPS.<br />
<h2 id="step-two-—-grant-permissions">
Step Two — Grant Permissions</h2>
Now we have the directory structure for our files, but they are owned
by our root user. If we want our regular user to be able to modify
files in our web directories, we can change the ownership by doing this:<br />
<pre>sudo chown -R $USER:$USER /var/www/<span class="highlight">example.com</span>/public_html
sudo chown -R $USER:$USER /var/www/<span class="highlight">test.com</span>/public_html
</pre>
The <code>$USER</code> variable will take the value of the user you
are currently logged in as when you press "ENTER". By doing this, our
regular user now owns the <code>public_html</code> subdirectories where we will be storing our content.<br />
We should also modify our permissions a little bit to ensure that
read access is permitted to the general web directory and all of the
files and folders it contains so that pages can be served correctly:<br />
<pre class="code-pre "><code>sudo chmod -R 755 /var/www
</code></pre>
Your web server should now have the permissions it needs to serve
content, and your user should be able to create content within the
necessary folders.<br />
<h2 id="step-three-—-create-demo-pages-for-each-virtual-host">
Step Three — Create Demo Pages for Each Virtual Host</h2>
We have our directory structure in place. Let's create some content to serve.<br />
We're just going for a demonstration, so our pages will be very simple. We're just going to make an <code>index.html</code> page for each site.<br />
Let's start with <code>example.com</code>. We can open up an <code>index.html</code> file in our editor by typing:<br />
<pre>nano /var/www/<span class="highlight">example.com</span>/public_html/index.html
</pre>
In this file, create a simple HTML document that indicates the site it is connected to. My file looks like this:<br />
<pre><html>
<head>
<title>Welcome to <span class="highlight">Example.com</span>!</title>
</head>
<body>
<h1>Success! The <span class="highlight">example.com</span> virtual host is working!</h1>
</body>
</html>
</pre>
Save and close the file when you are finished.<br />
We can copy this file to use as the basis for our second site by typing:<br />
<pre>cp /var/www/<span class="highlight">example.com</span>/public_html/index.html /var/www/<span class="highlight">test.com</span>/public_html/index.html
</pre>
We can then open the file and modify the relevant pieces of information:<br />
<pre>nano /var/www/<span class="highlight">test.com</span>/public_html/index.html
</pre>
<pre><html>
<head>
<title>Welcome to <span class="highlight">Test.com</span>!</title>
</head>
<body>
<h1>Success! The <span class="highlight">test.com</span> virtual host is working!</h1>
</body>
</html>
</pre>
Save and close this file as well. You now have the pages necessary to test the virtual host configuration.<br />
<h2 id="step-four-—-create-new-virtual-host-files">
Step Four — Create New Virtual Host Files</h2>
Virtual host files are the files that specify the actual
configuration of our virtual hosts and dictate how the Apache web server
will respond to various domain requests.<br />
Apache comes with a default virtual host file called <code>000-default.conf</code> that we can use as a jumping off point. We are going to copy it over to create a virtual host file for each of our domains.<br />
We will start with one domain, configure it, copy it for our second
domain, and then make the few further adjustments needed. The default
Ubuntu configuration requires that each virtual host file end in <code>.conf</code>.<br />
<h3 id="create-the-first-virtual-host-file">
Create the First Virtual Host File</h3>
Start by copying the file for the first domain:<br />
<pre>sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/<span class="highlight">example.com</span>.conf
</pre>
Open the new file in your editor with root privileges:<br />
<pre>sudo nano /etc/apache2/sites-available/<span class="highlight">example.com</span>.conf
</pre>
The file will look something like this (I've removed the comments here to make the file more approachable):<br />
<pre><VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
</pre>
As you can see, there's not much here. We will customize the items
here for our first domain and add some additional directives. This
virtual host section matches <em>any</em> requests that are made on port 80, the default HTTP port.<br />
First, we need to change the <code>ServerAdmin</code> directive to an email that the site administrator can receive emails through.<br />
<pre>ServerAdmin <span class="highlight">admin@example.com</span>
</pre>
After this, we need to <em>add</em> two directives. The first, called <code>ServerName</code>,
establishes the base domain that should match for this virtual host
definition. This will most likely be your domain. The second, called <code>ServerAlias</code>, defines further names that should match as if they were the base name. This is useful for matching hosts you defined, like <code>www</code>:<br />
<pre>ServerName <span class="highlight">example.com</span>
ServerAlias <span class="highlight">www.example.com</span>
</pre>
The only other thing we need to change for a basic virtual host file
is the location of the document root for this domain. We already
created the directory we need, so we just need to alter the <code>DocumentRoot</code> directive to reflect the directory we created:<br />
<pre>DocumentRoot /var/www/<span class="highlight">example.com</span>/public_html
</pre>
In total, our virtualhost file should look like this:<br />
<pre><VirtualHost *:80>
ServerAdmin <span class="highlight">admin@example.com</span>
ServerName <span class="highlight">example.com</span>
ServerAlias <span class="highlight">www.example.com</span>
DocumentRoot /var/www/<span class="highlight">example.com</span>/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
</pre>
Save and close the file.<br />
<h3 id="copy-first-virtual-host-and-customize-for-second-domain">
Copy First Virtual Host and Customize for Second Domain</h3>
Now that we have our first virtual host file established, we can
create our second one by copying that file and adjusting it as needed.<br />
Start by copying it:<br />
<pre>sudo cp /etc/apache2/sites-available/<span class="highlight">example.com</span>.conf /etc/apache2/sites-available/<span class="highlight">test.com</span>.conf
</pre>
Open the new file with root privileges in your editor:<br />
<pre>sudo nano /etc/apache2/sites-available/<span class="highlight">test.com</span>.conf
</pre>
You now need to modify all of the pieces of information to reference
your second domain. When you are finished, it may look something like
this:<br />
<pre><VirtualHost *:80>
ServerAdmin <span class="highlight">admin@test.com</span>
ServerName <span class="highlight">test.com</span>
ServerAlias <span class="highlight">www.test.com</span>
DocumentRoot /var/www/<span class="highlight">test.com</span>/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
</pre>
Save and close the file when you are finished.<br />
<h2 id="step-five-—-enable-the-new-virtual-host-files">
Step Five — Enable the New Virtual Host Files</h2>
Now that we have created our virtual host files, we must enable them. Apache includes some tools that allow us to do this.<br />
We can use the <code>a2ensite</code> tool to enable each of our sites like this:<br />
<pre>sudo a2ensite <span class="highlight">example.com</span>.conf
sudo a2ensite <span class="highlight">test.com</span>.conf
</pre>
When you are finished, you need to restart Apache to make these changes take effect:<br />
<pre class="code-pre "><code>sudo service apache2 restart
</code></pre>
You will most likely receive a message saying something similar to:<br />
<pre class="code-pre "><code> * Restarting web server apache2
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
</code></pre>
This is a harmless message that does not affect our site.<br />
<h2 id="step-six-—-set-up-local-hosts-file-optional">
Step Six — Set Up Local Hosts File (Optional)</h2>
If you haven't been using actual domain names that you own to test
this procedure and have been using some example domains instead, you can
at least test the functionality of this process by temporarily
modifying the <code>hosts</code> file on your local computer.<br />
This will intercept any requests for the domains that you configured
and point them to your VPS server, just as the DNS system would do if
you were using registered domains. This will only work from your
computer though, and is simply useful for testing purposes.<br />
Make sure you are operating on your local computer for these steps
and not your VPS server. You will need to know the computer's
administrative password or otherwise be a member of the administrative
group.<br />
If you are on a Mac or Linux computer, edit your local file with administrative privileges by typing:<br />
<pre class="code-pre "><code>sudo nano /etc/hosts
</code></pre>
If you are on a Windows machine, you can <a href="http://support.microsoft.com/kb/923947">find instructions on altering your hosts file</a> here.<br />
The details that you need to add are the public IP address of your
VPS server followed by the domain you want to use to reach that VPS.<br />
For the domains that I used in this guide, assuming that my VPS IP address is <code>111.111.111.111</code>, I could add the following lines to the bottom of my hosts file:<br />
<pre>127.0.0.1 localhost
127.0.1.1 guest-desktop
111.111.111.111 <span class="highlight">example.com</span>
111.111.111.111 <span class="highlight">test.com</span>
</pre>
This will direct any requests for <code>example.com</code> and <code>test.com</code> on our computer and send them to our server at <code>111.111.111.111</code>. This is what we want if we are not actually the owners of these domains in order to test our virtual hosts.<br />
Save and close the file.<br />
<h2 id="step-seven-—-test-your-results">
Step Seven — Test your Results</h2>
Now that you have your virtual hosts configured, you can test your
setup easily by going to the domains that you configured in your web
browser:<br />
<pre>http://<span class="highlight">example.com</span>
</pre>
You should see a page that looks like this:<br />
<img alt="Apache virt host example" src="https://assets.digitalocean.com/articles/apache_virt_hosts_1404/example.png" /><br />
Likewise, if you can visit your second page:<br />
<pre>http://<span class="highlight">test.com</span>
</pre>
You will see the file you created for your second site:<br />
<img alt="Apache virt host test" src="https://assets.digitalocean.com/articles/apache_virt_hosts_1404/test.png" /><br />
If both of these sites work well, you've successfully configured <strong>two</strong> virtual hosts on the same server.<br />
If you adjusted your home computer's hosts file, you may want to
delete the lines you added now that you verified that your configuration
works. This will prevent your hosts file from being filled with
entries that are not actually necessary. <br />
If you need to access this long term, consider purchasing a domain name for each site you need and <a href="https://www.digitalocean.com/community/articles/how-to-set-up-a-host-name-with-digitalocean">setting it up to point to your VPS server</a>.<br />
<h2 id="conclusion">
Conclusion</h2>
If you followed along, you should now have a single server handling
two separate domain names. You can expand this process by following the
steps we outlined above to make additional virtual hosts.<br />
There is no software limit on the number of domain names Apache can
handle, so feel free to make as many as your server is capable of
handling.<br />
<br />
Refrence - https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts<br />
</div>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-80538374790175576962017-07-21T22:11:00.004-07:002017-07-21T22:11:42.157-07:00How to move, copy and delete a file or, folder on linux<div dir="ltr" style="text-align: left;" trbidi="on">
Sometimes you don't remember linux command for these basic operations copy, move, delete a file and folder. There are three commands for each operation,<br />
<br />
<div class="_yXc">
<ol class="_jYe">
<li class="_AXc">cp:
Copying Files. A basic example of the cp command to copy files (keep
the original file and make a duplicate of it) . </li>
<li class="_AXc">mv: Moving (and Renaming) Files. The mv command lets you move a file from one directory location to another. </li>
<li class="_AXc">rm: Deleting Files.</li>
</ol>
the Linux command line offers far greater power and efficiency than
the GUI. For instance, to instantly seek out and move all of the files
above to a subdirectory called <i>budget</i>, your command line instruction would simply be:
<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107ca1628104048" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107ca1628104048-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107ca1628104048-1">
<span class="crayon-r">mv</span><span class="crayon-h"> </span><span class="crayon-o">*</span><span class="crayon-e">_expenses </span><span class="crayon-v">budget</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">Each of the Linux commands to move, copy, or delete files have options to make it more productive. Read on to find out more.</span><br />
<br />
<h3>
1. <em>cp</em>: Copying Files</h3>
A basic example of the <em>cp </em>command to copy files (keep the original file and make a duplicate of it) might look like:<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cbf728365012" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cbf728365012-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cbf728365012-1">
<span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-e">joe_expenses </span><span class="crayon-v">cashflow</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">In this example, we copy the </span><i style="line-height: 1.5em;">joe_expenses </i><span style="line-height: 1.5em;">file to the </span><i style="line-height: 1.5em;">cashflow </i><span style="line-height: 1.5em;">directory, which (because we haven’t specified anything else) is in our login directory.</span><br />
<h4>
Additional Options</h4>
Options are similar to those for the <em>mv </em>command:<br />
<b><em>-i</em> </b>for interactive, asks you to confirm if an existing file (perhaps a version of <i>joe_expenses </i>already exists in the cashflow directory) should be over written in the copying process.<br />
<em><b>-r</b></em> for recursive, to copy all the subdirectories and files in a given directory and preserve the tree structure.<br />
<em><b>-v</b></em> for verbose, shows files being copied one by one. For example:<br />
<table class="crayon-table"><tbody>
<tr class="crayon-row"><td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cca801850871-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cca801850871-1">
<span class="crayon-r">cp</span><span class="crayon-h"> </span><span class="crayon-e">joe_expenses </span><span class="crayon-e">cath </span><span class="crayon-e">expenses </span><span class="crayon-v">cashflow</span>
</div>
</div>
</td></tr>
</tbody></table>
<br />
<h3>
2. <em>mv</em>: Moving (and Renaming) Files</h3>
The <em>mv </em>command lets you move a file from one directory location to another. It also lets you rename a file (there is no separate <em>rename </em>command).<br />
Let’s start with the basic format:<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cb3004766390" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cb3004766390-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cb3004766390-1">
<span class="crayon-r">mv</span><span class="crayon-h"> </span><span class="crayon-e">joe_expenses </span><span class="crayon-v">JOE1_expenses</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">In this case, if </span><i style="line-height: 1.5em;">JOE1_expenses</i><span style="line-height: 1.5em;"> does not exist, it will be created with the exact content of </span><i style="line-height: 1.5em;">joe_expenses,</i><span style="line-height: 1.5em;"> and </span><i style="line-height: 1.5em;">joe_expenses</i><span style="line-height: 1.5em;"> will disappear.</span><br />
If <i>JOE1_expenses</i> already exists, its content will be replaced with that of <i>joe_expenses</i> (and <i>joe_expenses</i> will still disappear).<br />
<h4>
Additional Options</h4>
Options for <em>mv</em> include:<br />
<b><em>-i</em> </b>for interactive, asks you to confirm if an existing file should be over written.<br />
<em><b>-f</b> </em>for force, overrides all interactivity and executes the <em>mv</em>
instruction without returning any prompts. (You must be sure your
instruction is exactly what you want if you decide to apply the <em><b>-f </b></em>option.)<br />
<b><em>-v</em> </b>for verbose, to show the files being moved one by one<br />
<br /><div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cca801850871" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row"><td class="crayon-nums " data-settings="show"><br /></td><td class="crayon-code"><br /></td>
</tr>
</tbody></table>
</div>
</div>
<h3>
3. <em>rm</em>: Deleting Files</h3>
File deletion is done using the <em>rm</em> (remove) command.<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cd5452303603" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cd5452303603-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cd5452303603-1">
<span class="crayon-r">rm</span><span class="crayon-h"> </span><span class="crayon-v">joe_expenses</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">This will delete the </span><i style="line-height: 1.5em;">joe_expenses </i><span style="line-height: 1.5em;">file forever (maybe Joe would like that!).</span><br />
<h4>
Additional Options</h4>
The <em>rm </em>command options include <b><em>-i</em> (</b>interactive), <b><em>-f</em> </b>(force), <em><b>-v </b></em>(verbose), and <em><b>-r </b></em>(recursive).<br />
Like the commands above, it can also be applied to more than one file at a time.<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107ce0010958099" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107ce0010958099-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107ce0010958099-1">
<span class="crayon-r">rm</span><span class="crayon-h"> </span><span class="crayon-e">joe_expenses </span><span class="crayon-v">cath_expenses</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">This will remove both of these files.</span><br />
Using the wildcard character: “*”<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107ceb214525233" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107ceb214525233-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107ceb214525233-1">
<span class="crayon-r">rm</span><span class="crayon-h"> </span><span class="crayon-o">*</span><span class="crayon-v">_expenses</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">This will remove </span><i style="line-height: 1.5em;">joe_expenses</i><span style="line-height: 1.5em;">, </span><i style="line-height: 1.5em;">cath_expenses</i><span style="line-height: 1.5em;">, </span><i style="line-height: 1.5em;">mike_expenses, </i><span style="line-height: 1.5em;">and </span><i style="line-height: 1.5em;">robin_expenses</i><span style="line-height: 1.5em;">, forever.</span><br />
Likewise, if you decide you want to remove everything you copied into
the cashflow directory above and the directory itself, use:<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cf5039329352" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cf5039329352-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cf5039329352-1">
<span class="crayon-r">rm</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-i">r</span><span class="crayon-h"> </span><span class="crayon-v">cashflow</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<div class="h2-header">
<h2>
Use Caution with These Commands</h2>
</div>
For each of these commands, the use of the <em><b>-i </b></em>(interactive)
option is highly recommended, at least in the beginning. This gives you
a second chance to spot any unfortunate mistakes.<br />
Similarly, use caution if you apply either <em><b>-f </b></em>(force) or <b><em>-r</em> </b>(recursive), especially if you are also using a wildcard character like “<strong>*</strong>” to apply the command to several files at once.<br />
<h3>
Beware of the <em>-r</em> Option!</h3>
We’ll say it once and once only. Don’t do this:<br />
<div class="crayon-syntax crayon-theme-github crayon-font-monospace crayon-os-pc print-yes notranslate" data-settings=" no-popup minimize scroll-mouseover disable-anim" id="crayon-5972a2f107cfe323914700" style="font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 10px;">
<div class="crayon-main" style="max-height: 340px; overflow: hidden; position: relative; z-index: 1;">
<table class="crayon-table"><tbody>
<tr class="crayon-row">
<td class="crayon-nums " data-settings="show">
<div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
<div class="crayon-num" data-line="crayon-5972a2f107cfe323914700-1">
1</div>
</div>
</td>
<td class="crayon-code"><div class="crayon-pre" style="-moz-tab-size: 4; -o-tab-size: 4; -webkit-tab-size: 4; font-size: 12px !important; line-height: 15px !important; tab-size: 4;">
<div class="crayon-line" id="crayon-5972a2f107cfe323914700-1">
<span class="crayon-r">rm</span><span class="crayon-h"> </span><span class="crayon-o">-</span><span class="crayon-v">r</span><span class="crayon-h"> </span><span class="crayon-o">*</span>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
<span style="line-height: 1.5em;">This will delete every file and every directory you have.</span><br />
<br />
</div>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-45214073277680784352017-07-21T00:09:00.001-07:002017-07-21T00:09:13.373-07:00what is sitemap.xml file<div dir="ltr" style="text-align: left;" trbidi="on">
Sitemaps are a URL inclusion protocol and complements <code>robot.txt</code>, a URL exclusion protocol. <br />
The <b>sitemap.xml</b> file allows a webmaster to inform search engines about all URLs on a website that are available for crawling. It allows webmasters to include
additional information about each URL: when it was last updated, how
often it changes, and how important it is in relation to other URLs in
the site. This allows search engines to crawl the site more
intelligently. A Sitemap is an xml
file that lists the URLs for a site. <br />
Sitemaps are particularly beneficial on websites where:<br />
<ul>
<li>some areas of the website are not available through the browsable interface</li>
<li>webmasters use rich Ajax, Silverlight, or Flash content that is not normally processed by search engines.</li>
<li>The site is very large and there is a chance for the web crawlers to overlook some of the new or recently updated content</li>
<li>When websites have a huge number of pages that are isolated or not well linked together, or</li>
<li>When a website has few external links</li>
</ul>
Example of a sitemap,<br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br /><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" <br /> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br /> xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"><br /> <url><br /> <loc>http://www.pineapplelabs.in/</loc><br /> <lastmod>2017-07-21</lastmod><br /> <changefreq>1</changefreq><br /> <priority>1.0</priority><br /> </url><br /> <url><br /> <loc>http://www.pineapplelabs.in/about.php</loc><br /> <lastmod>2017-07-21</lastmod><br /> <changefreq>1</changefreq><br /> <priority>0.9</priority><br /> </url><br /> <url><br /> <loc>http://www.pineapplelabs.in/career.php</loc><br /> <lastmod>2017-07-21</lastmod><br /> <changefreq>1</changefreq><br /> <priority>0.9</priority><br /> </url><br /> <url><br /> <loc>http://pineapple-labs.blogspot.in/</loc><br /> <lastmod>2017-07-21</lastmod><br /> <changefreq>1</changefreq><br /> <priority>0.9</priority><br /> </url><br /></urlset> </div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-88862247197146927322017-07-20T23:34:00.001-07:002017-07-20T23:34:33.313-07:00What is robot.txt file on a website?<div dir="ltr" style="text-align: left;" trbidi="on">
Search engines <span class="correction alternate" id="GingerWidget-correction-0">generally crawl</span> a website using a computer <span class="correction alternate" id="GingerWidget-correction-1">program</span> known as <span class="correction alternate" id="GingerWidget-correction-2">bots</span>. Like google search <span class="correction alternate" id="GingerWidget-correction-3">web sites</span> using <span class="correction alternate" id="GingerWidget-correction-4">Googlebot</span>. robot.txt <span class="correction alternate" id="GingerWidget-correction-5">file, restrict</span> a <span class="correction alternate" id="GingerWidget-correction-6">boat</span> to have access to all the folders which contains some confidential data or, unnecessary data. <br />
<br />
Below ate the file format explained with example,<br />
<br />
The same result can be accomplished with an empty or missing robots.txt file.<br />
This example tells <b>all robots</b> to stay out of a website:<br />
<br />
<pre>User-agent: *
Disallow: /
</pre>
<br />
This example tells <b>all robots</b> that they <b>can visit all files</b> because the wildcard <code>*</code> stands for all robots and the <code>Disallow</code> directive has no value, meaning no pages are disallowed.<br />
<br />
<pre>User-agent: *
Disallow:</pre>
<pre> </pre>
This example tells <b>all robots</b> to stay away from one specific file:<br />
<br />
User-agent: *
Disallow: /directory/file.html
<br />
<pre> </pre>
<br />
<br />
<br />
This example tells <b>all robots</b> not to enter three directories:<br />
<pre> </pre>
<pre>User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /junk/
</pre>
<br />
Note that all other files in the specified directory will be processed.<br />
This example tells <b>a specific robot</b> to stay out of a website:<br />
<br />
<pre>User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot
Disallow: /</pre>
<pre> </pre>
This example tells <b>two specific robots</b> not to enter one specific directory:<br />
<br />
<pre>User-agent: BadBot # replace 'BadBot' with the actual user-agent of the bot
User-agent: Googlebot
Disallow: /private/</pre>
<pre> </pre>
Example demonstrating how comments can be used:<br />
<pre> </pre>
<pre># Comments appear after the "#" symbol at the start of a line, or after a directive
User-agent: * # match all bots
Disallow: / # keep them out</pre>
<pre> </pre>
It is also possible to list multiple <b>robots</b> with their own rules. The actual <b>robot</b> string is defined by the crawler. A few sites, such as Google,
support several user-agent strings that allow the operator to deny
access to a subset of their services by using specific user-agent
strings.<br />
Example demonstrating multiple user-agents:<br />
<br />
<pre>User-agent: googlebot # all Google services
Disallow: /private/ # disallow this directory
User-agent: googlebot-news # only the news service
Disallow: / # disallow everything
User-agent: * # any robot
Disallow: /something/ # disallow this directory
</pre>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com1tag:blogger.com,1999:blog-7106786503886130541.post-72399258787136632332017-07-19T03:49:00.002-07:002017-07-19T04:06:24.180-07:00About Us<div dir="ltr" style="text-align: left;" trbidi="on">
We are consultants, we do requirement analysis, we strive to find out innovative solution, check feasibility of solution, design, develop, test and deploy the IT solution to solve your problem. Our prime aim to focus on issues faced by a start up businesses and solve it using information technology.<br />
<br />
As we know for any start up to grow at faster pace, its presence on internet is very important. It almost impossible to find out a customer who is sitting next to you without internet, at the same time internet connects you from local customers to global customers, makes your client base as broad as you want to make it.<br />
<br />
We have expertise in user experience (UX Design), Graphics Design, Photoshop, HTML Website Templates Design, Website design, UI design as per SEO Compliance, Domain Name Registration, Control Panel Management, Website Hosting using Amazon AWS, Google Cloud, Microsoft Azure, Cloud Servers, Managing Cloud servers and traffic management, Mail Server Setup, Mail Client Configuration, Batch Mail Processing, SEO Optimization, Google Analytics Setup, Visitors Tracking, Paid Advertisements, Social Media Integration and Managment Like Facebook, Twitter, LinkedIn, Instagram, Google Plus, Facebook Authentication, Google Authentication. </div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com1tag:blogger.com,1999:blog-7106786503886130541.post-51196703072835886072017-07-16T23:27:00.001-07:002017-07-16T23:58:12.338-07:00First impression is the last impression<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Why is the Look and Feel of a Website Important?</b><br />
<br />
Though there is some leeway within general industry categories, users
can get confused or turned off by websites that look or feel too far
outside of their expectations for a business or industry. Before you
begin a website redesign, check your goals against industry standards by
looking at your competitors’ websites. A fitness website should look
fresh, powerful and well organized. A website for a band or fashion
designer can be more creative with colors, texture and image choices.<br />
The look and feel of a website can also be described as the website’s
“personality.” Your website’s personality should match the attitude of
your business and your business objectives while still fitting in with
your client’s expectations of the business and industry you’re in.Your website’s overall look and feel is important because it instantly
conveys an attitude to your clients before they even start reading the
content on the site.<br />
<br />
<br />
<b>What is the “Look and Feel” of a Website?</b><br />
In its most basic terms, the “look and feel” of a website is how the
site looks to the user and how it feels when he or she is interacting
with it.<br />
The “look” is defined by the following components of your website:<br />
<ul>
<li>Color palette</li>
<li>Images</li>
<li>Layout</li>
<li>Font choices</li>
<li>Overall styling</li>
</ul>
The “feel” is determined by these characteristics:<br />
<ul>
<li>The movement and response of dynamic components like dropdown menus, buttons, forms, and galleries</li>
<li>Sound effects</li>
<li>The speed by which pages and images load</li>
</ul>
<br /><b>How to Use “Look and Feel” to Enhance Your Web Design</b><br />
Look and feel can be described using adjectives just like you would
describe a friend or business associate. By using accurate adjectives,
you can assist the team at your chosen web design company in their
layout and design choices before they present their work to you.<br />
Here are some examples of the types of adjectives you might use to describe your website:<br />
<ul>
<li>Friendly</li>
<li>Approachable</li>
<li>Professional</li>
<li>Experienced</li>
<li>Upscale</li>
<li>Exclusive</li>
<li>Cutting edge</li>
<li>Stylish</li>
<li>High-tech</li>
<li>Powerful</li>
</ul>
On the other hand, websites with poorly considered overall design and
usability schemes can inadvertently fall into less flattering
categories, such as:<br />
<ul>
<li>Boring</li>
<li>Uptight</li>
<li>Stodgy</li>
<li>Outdated</li>
<li>Tacky</li>
<li>Cluttered</li>
<li>Confusing</li>
<li>Childish</li>
</ul>
Instead of focusing on just positive adjectives, you can help your
web design team triangulate your expectations by providing them with a
description scale such as, “The website should look fun and exciting but
not childish” or “Our website should be professional but never stodgy
or old-fashioned.”<br />
When working with a web design company, take some time to clearly
define your business objectives and key adjectives regarding the look
and feel of your website to ensure that everyone is on the same page
before web design work begins.</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com1tag:blogger.com,1999:blog-7106786503886130541.post-30191959663086694232017-07-16T19:48:00.002-07:002017-07-16T19:48:27.104-07:00How to redirect non-www URLs to www? <div dir="ltr" style="text-align: left;" trbidi="on">
<h3 class="entry-title" style="text-align: left;">
How to Properly Redirect Your Domain With or Without www ?</h3>
<div class="entry-title" style="text-align: left;">
Proper redirects are important. Failure to use them will mean search engines such as <a href="http://www.google.com/" target="_blank" title="Google">Google</a>
will either see your site twice, or, they might not see it at all
either of which can dramatically reduce your search engine ranking.</div>
<div class="entry-title" style="text-align: left;">
<br /></div>
<a href="http://en.wikipedia.org/wiki/URL_redirection" target="_blank" title="URL Redirection on Wikipedia">Redirects</a>
are what happens when you type in the address of one website and,
before you know it, a different address for the site appears in your
address bar. Every time you click a <a href="http://en.wikipedia.org/wiki/URL_shortening" target="_blank" title="URL shortening on Wikipedia">short link</a> in <a href="http://www.twitter.com/" target="_blank" title="Twitter">Twitter</a> or <a href="http://www.facebook.com/" target="_blank" title="Facebook">Facebook</a>,
you type www where it isn’t needed or don’t type www where it is
needed, or just plain get transferred from one page to another you are
using a redirect.<br />
For SEO these are extremely important as <a href="http://googlewebmastercentral.blogspot.com/2010/11/best-practices-for-running-multiple.html" target="_blank" title="Best practices for running multiple sites - Google Webmaster Blog">Google may penalize you for posting the same content in multiple websites</a> and, if not done properly, a www redirect will in fact look to Google as if you have 2 websites, one with www and one without.<span id="more-3243"></span><br />
Fear not though, if you use a <a href="http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=bit51-" target="_blank" title="Affiliate link to Hostgator">Linux based web host</a> (or any host using the <a href="http://httpd.apache.org/" target="_blank" title="Apache httpd server">Apache web server</a>) the fix is easy.<br />
<h3>
Step 1:</h3>
Figure out if you want your website address to display with the www or without it.<br />
Visitors will still be able to use both, but you want to settle on 1
for SEO purposes. From a technical point of view it does not matter
which you choose only that you choose one. If you have printed material
and/or many links using it one way or the other settle on that one.<br />
<h3>
Step 2:</h3>
Open up the <em>.htaccess</em> file in the root (top folder of your website where your index file lives) or create the file <em>.htaccess</em> if it doesn’t already exist.<br />
<h3>
Step 3:</h3>
<h4>
If you want to display the www enter the following lines:</h4>
<div class="gist" id="gist5431223">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div class="file" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1">
<div class="blob-wrapper data type-text" itemprop="text">
<table class="highlight tab-size js-file-line-container" data-tab-size="8">
<tbody>
<tr>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div>
</div>
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC1">RewriteEngine On</td>
</tr>
<tr>
</tr>
</tbody></table>
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC2">RewriteCond %{HTTP_HOST} ^your-domain\.com</td>
</tr>
<tr>
</tr>
</tbody></table>
<div class="gist" id="gist5431223">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div class="file" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1">
<div class="blob-wrapper data type-text" itemprop="text">
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3">RewriteRule (.*) http://www.your-domain.com/$1 [R=301,L]</td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-1-LC3"> </td></tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div>
</div>
<h4>
</h4>
<h4>
If you do NOT want to display the www enter the following lines:</h4>
<div class="gist" id="gist5431224">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div class="file" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2">
<div class="blob-wrapper data type-text" itemprop="text">
<table class="highlight tab-size js-file-line-container" data-tab-size="8">
<tbody>
<tr>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div>
</div>
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC1">RewriteEngine On</td>
</tr>
<tr>
</tr>
</tbody></table>
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC2">RewriteCond %{HTTP_HOST} ^www\.your-domain\.com</td>
</tr>
<tr>
</tr>
</tbody></table>
<div class="gist" id="gist5431224">
<div class="gist-file">
<div class="gist-data">
<div class="js-gist-file-update-container js-task-list-container file-box">
<div class="file" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2">
<div class="blob-wrapper data type-text" itemprop="text">
<table class="highlight tab-size js-file-line-container" data-tab-size="8"><tbody>
<tr><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3">RewriteRule (.*) http://your-domain.com/$1 [R=301,L]</td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td><td class="blob-code blob-code-inner js-file-line" id="file-how-to-properly-redirect-your-domain-with-or-without-www-2-LC3"> </td></tr>
</tbody></table>
</div>
</div>
</div>
</div>
</div>
</div>
<br />
<u><b>Note the backslash “” before the period(s) on the 2nd line of each
block of code. This is very important and your redirect will not work
without it.</b></u><br />
<br />
How does this work? It makes use of an Apache module called <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank" title="Apache module mod_rewrite">mod_rewrite</a>
which is first invoked using the “RewriteEngine On” line. Next, it
looks for a condition in which the domain name is specified as listed on
the 2nd line. Finally, it sends the user to the new domain followed by
whatever page they were trying to get (the $1 is anything after the
slash following the domain name in the URL). It also makes it a
permanent redirect with R=301 and tells the server it is the last rule
to process in its chain with the L.<br />
<h3>
Step 4:</h3>
Save the file and test it by going to your website with and without the www making sure you see the desired behavior.<br />
<h3>
Step 5:</h3>
Test it externally with a site like <a href="http://www.pearanalytics.com/" target="_blank" title="pearanalytics">pearanalytics</a> which will tell you if it is not redirecting correctly.<br />
<br />
<br />
<br />
<br />
<h3 style="text-align: left;">
What If htaccess file doesn't work? Enabling .htaccess file to rewrite path (not working)</h3>
<h4 style="text-align: left;">
<strong>The best way is :</strong></h4>
<em>Edit or creat config file</em><br />
<em> </em> <br />
<code>/etc/apache2/conf-available/httpd.conf</code><br />
<br />
<em>Add</em><br />
<em> </em> <br />
<code><Directory /var/www/> </code><br />
<code>Options Indexes FollowSymLinks </code><br />
<code>AllowOverride All </code><br />
<code>Require all granted </code><br />
<code></Directory> </code><br />
<br />
<br />
Enable the config file<br />
<br />
<code>sudo a2enconf httpd</code><br />
<br />
<em>Restart or reload Apache</em><br />
<code>sudo service apache2 restart</code><br />
or<br />
<code>sudo service apache2 reload</code><br />
<br />
<strong>It's done!</strong><br />
<br />
<strong>Alternatively, </strong><br />
<br />
<div class="post-text" itemprop="text">
New apache version has change in some way. If your apache version is 2.4 then you have to go to <code>/etc/apache2/</code>. There will be a file named <code>apache2.conf</code>. You have to edit that one(you should have root permission). Change directory text like this<br />
<pre><code> </code></pre>
<pre><code><Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory></code></pre>
<pre><code> </code></pre>
Now restart apache.<br />
<br />
<pre><code>service apache2 reload</code></pre>
<pre><code> </code></pre>
Hope it works.<br />
</div>
<br />
<h3 style="text-align: left;">
</h3>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-83242526227981247352017-07-06T23:10:00.001-07:002017-07-06T23:11:31.695-07:00Digital Signatures and Certificates<div dir="ltr" style="text-align: left;" trbidi="on">
<table border="0" cellpadding="2" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><b class="insideheadingtext"></b><br /></td></tr>
<tr><td></td></tr>
<tr><td><b><span class="insidesubheadingtext1">What is a Digital Signature? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq1">
<span class="insidesubheadingtext">A
digital signature is an electronic form of a signature that can be used
to authenticate the identity of the sender of a message or the signer
of a document, and also ensure that the original content of the message
or document that has been sent is unchanged. Digital signatures are
easily transportable and cannot be imitated by someone else. The ability
to ensure that the original signed message arrived means that the
sender cannot easily disclaim it later.</span></div>
<div class="fagmarginleft" id="faq1">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is a Digital Signature Certificate (DSC)? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq2">
<span class="insidesubheadingtext">Digital
Signature Certificates (DSC) is the electronic format of physical or
paper certificate like a driving License, passport etc. Certificates
serve as proof of identity of an individual for a certain purpose; for
example, a Passport identifies someone as a citizen of that country; who
can legally travel to any country. Likewise, a Digital Signature
Certificate can be presented electronically to prove your identity, to
access information or services on the Internet or to sign certain
documents digitally.</span></div>
<div class="fagmarginleft" id="faq2">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">Why do I need a Digital Signature Certificate? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq3">
<span class="insidesubheadingtext">A
Digital Signature Certificate authenticates your identity
electronically. It also provides you with a high level of security for
your online transactions by ensuring absolute privacy of the information
exchanged using a Digital Signature Certificate. You can use
certificates to encrypt information such that only the intended
recipient can read it. You can digitally sign information to assure the
recipient that it has not been changed in transit, and also verify your
identity as the sender of the message.</span></div>
<div class="fagmarginleft" id="faq3">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">Where can I purchase a Digital Signature Certificate? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq4">
<span class="insidesubheadingtext">
Legally valid Digital Signature Certificates are issued only through a
Controller of Certifying Authorities (CCA), Govt. of India,licensed
Certifying Authorities (CA), such as eMudhra.<br />eMudhra, a Certifying
Authority (CA) licensed by CCA, offers secure digital signatures through
various options tailored to suit individual as well as organizational
needs. </span></div>
<div class="fagmarginleft" id="faq4">
</div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"><b>Where can I use Digital Signature Certificates?</b> </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq5">
<span class="insidesubheadingtext">
You can use Digital Signature Certificates for the following:<br />
</span><br />
<ul><span class="insidesubheadingtext">
<li>For sending and receiving digitally signed and encrypted emails.</li>
<li>For carrying out secure web-based transactions, or to identify other participants of web-based transactions.</li>
<li>In eTendering, eProcurement, MCA [for Registrar of Companies
efiling], Income Tax [for efiling income tax returns] Applications and
also in many other applications.</li>
<li>For signing documents like MSWord, MSExcel and PDFs.</li>
<li>Plays a pivotal role in creating a paperless office.</li>
</span></ul>
<span class="insidesubheadingtext">
</span></div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"><b>How does a Digital Signature Certificate work?</b> </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq6">
<span class="insidesubheadingtext">
A Digital Signature Certificate explicitly associates the identity of an
individual/device with a pair of electronic keys - public and private
keys - and this association is endorsed by the CA. The certificate
contains information about a user's identity (for example, their name,
pincode, country, email address, the date the certificate was issued and
the name of the Certifying Authority that issued it).<br />These keys
complement each other in that one does not function in the absence of
the other. They are used by browsers and servers to encrypt and decrypt
information regarding the identity of the certificate user during
information exchange processes. The private key is stored on the user's
computer hard disk or on an external device such as a token. The user
retains control of the private key; it can only be used with the issued
password.<br />The public key is disseminated with the encrypted
information. The authentication process fails if either one of these
keys in not available or do not match. This means that the encrypted
data cannot be decrypted and therefore, is inaccessible to unauthorized
parties. </span></div>
<div class="fagmarginleft" id="faq6">
</div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"><b>Are Digital Signatures Certificate legally valid in India?</b> </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq7">
<span class="insidesubheadingtext">
Yes, subsequent to the enactment of Information Technology Act 2000 in
India, Digital Signature Certificates are legally valid in India.<br />Digital
Signature Certificates are issued by licensed Certifying Authorities
under the Ministry of Information Technology, Government of India as per
the Information Technology Act.
</span></div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"> What is the difference between a Digital Signature and a Digital Signature Certificate? </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq8">
<span class="insidesubheadingtext">
A digital signature is an electronic method of signing an electronic
document whereas a Digital Signature Certificate is a computer based
record that<br />
</span><br />
<ul><span class="insidesubheadingtext">
<li>Identifies the Certifying Authority issuing it. </li>
<li>Has the name and other details that can identify the subscriber.</li>
<li>Contains the subscriber's public key.</li>
<li>Is digitally signed by the Certifying Authority issuing it.</li>
<li>Is valid for either one year or two years.</li>
</span></ul>
<span class="insidesubheadingtext">
</span></div>
</td>
</tr>
<tr>
<td><b class="insidesubheadingtext" style="color: #f36f24;">Digital Signature Usage</b></td>
</tr>
<tr>
<td><span class="insidesubheadingtext1">Can I use one Digital Signature Certificate for multiple e-mail addresses? </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq9">
<span class="insidesubheadingtext">
No, you cannot. A digital signature certificate can have only one email address.
</span></div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1">Can I use digital signature certificate in e-tendering systems? </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq10">
<span class="insidesubheadingtext">
Digital signature certificates in e-tendering systems are allowed, but based on the service provider.
</span></div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1">Can digital signature certificates be used in wireless networks? </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq11">
<span class="insidesubheadingtext">
Yes, digital signature certificates can be employed in wireless networks.
</span></div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"> Am I allowed to use one web server certificate (SSL) for more than one website? </span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq12">
<span class="insidesubheadingtext">
No. You will not be able to use one SSL certificate on different
websites with different domain names because the certificate is
explicitly associated with the exact host and domain name.<br />A wild card SSL certificate can be issued that can support different sub domains like abc.emudhra.com, def.emudhra.com etc. </span></div>
<div class="fagmarginleft" id="faq12">
</div>
</td>
</tr>
<tr>
<td><b class="insidesubheadingtext" style="color: #f36f24;">Regulatory</b></td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"> <b>What is a Certifying Authority (CA)? </b></span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq13">
<span class="insidesubheadingtext">
A Certifying Authority is a trusted agency whose central responsibility
is to issue, revoke, renew and provide directories for Digital Signature
Certificates. According to Section 24 of the Information Technology Act
2000, "Certifying Authority" means a person who has been granted a
license to issue Digital Signature Certificates. </span></div>
<div class="fagmarginleft" id="faq13">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">Who can be a Certifying Authority (CA)? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq14">
<span class="insidesubheadingtext">
The IT Act 2000 details the prerequisites of a CA. Accordingly, a
prospective CA has to establish the required infrastructure, get it
audited by the auditors appointed by the office of Controller of
Certifying Authorities. Subsequent to complete compliance of all
requirements, a license to operate as a Certifying Authority can be
obtained. The license is issued by the Controller of Certifying
Authorities, Ministry of Information Technology, Government of India. </span></div>
<div class="fagmarginleft" id="faq14">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is a Registration Authority (RA)? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq15">
<span class="insidesubheadingtext">
A RA (Registration Authority) is an agent of the Certifying Authority
who collects the application forms and related documents for Digital
Signature Certificates, verifies the information submitted and approves
or rejects the application based on the results of the verification
process. </span></div>
<div class="fagmarginleft" id="faq15">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is the role of CCA? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq16">
<span class="insidesubheadingtext">
The Controller of Certifying Authorities (CCA) is a Government of India
undertaking that license and regulate the working of Certifying
Authorities.<br />
The CCA certifies the public keys of CAs, which enables users in the
cyberspace to verify that a given certificate is issued by a licensed
CA. For this purpose, CCA operates, the Root Certifying Authority of
India (RCAI).<br />
The CCA also maintains the National Repository of Digital Signature
Certificate (NRDC), which contains all the certificates issued by all
the CAs in the country. </span></div>
<div class="fagmarginleft" id="faq16">
</div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"> <b>What is NRDC? </b></span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq17">
<span class="insidesubheadingtext">
In accordance with Section 20 of the IT Act, NRDC is a national
repository maintained by the CCA that contains all Digital Signature
Certificates and CRLs issued by all the licensed CAs. It also contains
all the Digital Signature Certificates and CRLs issued by the CCA
through its RCAI. All Relying Parties are allowed to verify the
authenticity of a CA's public keys from this repository. </span></div>
<div class="fagmarginleft" id="faq17">
</div>
</td>
</tr>
<tr>
<td><span class="insidesubheadingtext1"> <b>What is RCAI? </b></span>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq18">
<span class="insidesubheadingtext">
RCAI is the Root Certifying Authority of India. It was established by
the CCA under Section 18(b) of the IT Act and is responsible for
digitally signing the public keys of all the licensed CAs in the
country.<br />
The RCAI root certificate is the highest level of certification in the
country. The RCAI root certificate is a self-signed certificate. <br />The key activities of the RCAI include:<br />
</span><br />
<ul><span class="insidesubheadingtext">
<li>Digitally signing licenses issued by CCA to CA</li>
<li>Digitally signing public keys corresponding to private keys of a CA</li>
<li>Ensuring availability of these signed certificates for verification by a Relying Party through the CCA or CA website</li>
</span></ul>
<span class="insidesubheadingtext">
</span></div>
</td>
</tr>
<tr>
<td><b class="insidesubheadingtext" style="color: #f36f24;">Repository</b></td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is a CRL? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq19">
<span class="insidesubheadingtext">
The Certificate Revocation List (CRL) is a list of certificates that
have been revoked by the CA, and are therefore no longer valid. </span></div>
<div class="fagmarginleft" id="faq19">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is a CPS? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq20">
<span class="insidesubheadingtext">
The Certificate Practice Statement (CPS) is a statement of the practices
that a Certification Authority (CA) employs for issuing and managing
certificates. A CPS may take the form of a declaration by the CA of the
details of its system's trustworthiness and the practices that it
employs both in its operations and in its support of issuance of a
certificate. </span></div>
<div class="fagmarginleft" id="faq20">
</div>
</td>
</tr>
<tr>
<td><b><span class="insidesubheadingtext1">What is a CP? </span></b>
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq21">
<span class="insidesubheadingtext">
Certifying Authorities issue Digital Signature Certificates that are
appropriate to specific purposes or applications. A Certificate Policy
(CP) describes the different classes of certificates issued by the CA,
the procedures governing their issuance and revocation and terms of
usage of such certificates, besides information regarding the rules
governing the different uses of these certificates. </span></div>
<div class="fagmarginleft" id="faq21">
</div>
</td>
</tr>
<tr>
<td>
<br />
</td>
</tr>
<tr>
<td><div class="fagmarginleft" id="faq22">
<br /></div>
</td></tr>
</tbody></table>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com2tag:blogger.com,1999:blog-7106786503886130541.post-75448939432584031752015-02-22T10:24:00.000-08:002015-02-22T10:25:48.276-08:00Seven reasons why my first Startup failed<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
We started our journey in wrong direction and we failed to change direction with time.<br />
<div>
Startups are hot talk these days and everyone want to start their own company. People read success stories but ignore the fact that more than 90% companies fail within 3 years of operation. Our startup <a href="http://www.yourstory.com/2014/04/school-gennie/" target="_blank">SchoolGennie</a> is one of R.I.P startup which we founded in 2013 but got shutdown in 2014.<br />
Let me share top reasons of our failure.<br />
<div style="text-align: center;">
<a href="http://d152j5tfobgaot.cloudfront.net/wp-content/uploads/2013/12/failure1.jpg"><img alt="" class="size-full wp-image-100588 aligncenter" src="http://d152j5tfobgaot.cloudfront.net/wp-content/uploads/2013/12/failure1.jpg" height="400" width="800" /></a></div>
<b>No Market Validation</b><br />
We wanted to build zomato like platform for school listing & reviews but realized that parents research for schools in admission days only. Then we thought of doing something else for education industry. With little knowledge about schools, we decided to build online collaboration platform for parents and teachers. We thought this was much desired product by education industry which can help building great relationships between parents and schools.<br />
<blockquote>
Do market research (product-market fit) before writing first line of code</blockquote>
We sowed the first seed of failure when we started building product without validating product-market fit. We could have done better things if we had few school signups before starting product development.<br />
<h3>
Waiting for perfect product launch</h3>
In my experience, there is no perfect product in startups, my suggestion is to keep building and keep releasing. We were not aware of Lean Startup concept which says, build fast — fail fast — fail cheap, and keep iterating until you success. Unfortunately, we kept investing time in building awesome product with great user experience and mind blowing features.<br />
<blockquote>
Launch MVP (Minimum Viable Product) as early as possible and keep improving product with feedback from early customers</blockquote>
We could have saved lot of resources with early launch of product. Customers should have given opportunity to test demo version, even with shitty user experience and half baked features. We spent almost half year to come up with first demo account, which could have been done in first month itself.<br />
<h3>
Following foot steps of competitors</h3>
When we launched our product we confronted with harsh reality, customers were not interested in our offerings. Then we started looking out what our competitors are selling. This was the opportunity to focus on USP (unique selling proposition) but we started building what our competitors were selling.<br />
<blockquote>
“Focus on something you are very good at — but your competitors are not”</blockquote>
We hired people from competitor’s sales team, we tried to sell with similar pitch, we prepared similar marketing material, we even tried to align our product features with competitor. Our efforts failed because we could not compete with competitors at points where they were good at — but we were not!!<br />
<h3>
Spending money on unwanted things</h3>
We spent too much on unwanted things like office, furniture and electrical appliances. We could have optimized expenses by running operations from our home.<br />
<blockquote>
“Spend money only if it helps in releasing software fast, test fast (customer acquisition) or pivot fast”</blockquote>
Startups have to <b>spend money on hiring talent</b> and there is no alternate unless you have time to do things yourself. Actually money was <b>not </b>primary reason of our failure but we could have done much more with same money, like hiring more smart developers to fast build & test our product.<br />
<h3>
Lack of Vision</h3>
Ultimately we lost the vision!! We forgot why we started company and where it should be in two years or five years. We were saying something and doing something else. We wanted to collect students data from 1000’s of schools but we were trying to sell to top schools only. We were not having any clue of our key growth metrics, unit economy, sales conversion ratios or product road-map.<br />
<blockquote>
Startups should keep eagle-eye focus on <b>Vision </b>and keep changing strategies and products to achieve end goal.</blockquote>
Influence of wrong people also disturbed our thought process. We discussed things with people who had no prior startup experience but they were successful in corporate job. My suggestion is, <b>do not </b>to follow advice of corporate guys, I am not saying they are wrong but things works differently in startups.<br />
<blockquote>
Startups have to explore their own growth path, don’t be afraid to experiment with new things.</blockquote>
<h3>
Delayed decisions</h3>
I believe every startup come at a stage where hard decisions are taken. Delay in decisions impact badly on startup growth. Founders should sit together, discuss deeply about issue, take firm decision and move on!! There are good decisions and there are bad decisions.<br />
If Founders are clear of what they want to achieve then they can take quick and efficient decisions otherwise they take decision tonight and tomorrow morning they want to change it.<br />
Something similar happened with us when we were to decide for sales partnerships, establishing new sales channels, product roadmap, equity allocation to team members, pivoting product and finally during critical decision of running or shutting down company.<br />
With time, we (founders) had differences in thought process, one of us wanted to try new unexplored things and other wanted to follow processes of big successful companies. One of us believed in open culture where anyone can contribute in any area but other believed in closed culture where two teams (dev & sales) should not share know-hows of each other.<br />
This friction and lack of cohesiveness was also reason of delayed decisions, hence one more step towards death of startup!!<br />
<h3>
No Mentors</h3>
Startup should genuinely invest time in finding good mentors. We could not find mentors for our-self or honestly we have not tried hard enough. Mentors can be really helpful in critical times when startup needs expert advice, connection in network and resolving internal conflicts.<br />
Now we are not working at SchoolGennie but it has been a great journey so far. I am really grateful to my co-founder <a href="https://www.linkedin.com/in/amitgupta03" rel="nofollow" target="_blank"><b>Amit</b></a>, who trusted my capabilities and gave me opportunity to work with him. He was instrumental to bring me out of corporate job and introducing me to amazing world of startups.</div>
<div>
Failures are not always bad if we know how to handle post-failure situation and apply learnings in future, on positive side I know some ways things don’t work and I will avoid repeating my mistakes. SchoolGennie experience actually helped me getting into my current startup, <a href="http://www.pocketscience.in/" rel="nofollow" target="_blank">PocketScience</a>, where I joined as co-founder.<br />
<br />
<br />
This reference is taken from :- <br />
<a href="http://yourstory.com/2014/10/schoolgennie-failure-reasons/">http://yourstory.com/2014/10/schoolgennie-failure-reasons/ </a></div>
</div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-15001365856863250572015-02-20T19:57:00.003-08:002015-02-20T19:57:33.557-08:007 Lessons Learned From Running a Consulting Company<div dir="ltr" style="text-align: left;" trbidi="on">
Although I don’t do much consulting these days, I used to run a
consulting company. It was an Internet marketing agency that helped
small and large brands like GM, HP, Samsung, Viacom and AOL boost their
traffic through search engine optimization and social media marketing.<br />
I did it for around six years, and boy did I make a lot of mistakes.
Running a consulting company is tough, and sadly it’s a lot less sexy
than it seems.<br />
Here are 7 lessons I learned from running a consulting company:<span id="more-3153"></span><br />
<h3>
Lesson #1: The day you sign a client is the day you start losing them</h3>
Consulting companies have a high churn rate. Some consultants claim
that they have never lost a client, but that’s a bunch of horse crap. If
a customer doesn’t renew their contract, I consider that a lost client.<br />
You never know how long a client is going to last, so make sure you
do everything possible to keep them. Here’s what I used to do to ensure
that clients stay as long as possible:<br />
<ul>
<li><strong>Set expectations from day one</strong> – before you take on a
client, you should let them know what they should expect and when to
expect it by. If they have unrealistic expectations, let them know why.</li>
<li><strong>Have a kick-off call</strong> – having one is a great way to
ensure that things start on the right foot. One unique thing you can do
is send your client some cookies or snacks in the mail so that they
feel like they are with you during the kick-off call.</li>
<li><strong>Weekly calls</strong> – every week, you should have at least
a 5-minute call with your client. Tell them what you did for the week
and see if they have any questions.</li>
<li><strong>Send industry updates</strong> – if you are a design agency,
you should be sending unique design news to your clients. If you have a
marketing agency, you should send them marketing information. Sending
industry related news to your clients not only shows that you know the
latest and the greatest, but it also makes them feel special.</li>
<li><strong>Monthly reports</strong> – at the end of each month, you
should send your clients a detailed report of everything you did.
Ideally, it should include pretty graphs and other forms of visual aids.
You should go over the report with the client over the phone or in
person.</li>
<li><strong>Monthly surveys</strong> – at the end of each month, I
recommend sending your clients a quick survey. The survey shouldn’t have
generic questions like “are you happy?”, but instead it should have
specific questions that help you improve the quality of your work.
Include questions such as “how can we make the monthly report better?”</li>
</ul>
<h3>
Lesson #2: Clients are always right, except when they are wrong</h3>
You are always going to have clients telling you what they want. And although they are paying you, <a href="http://www.quicksprout.com/2009/12/17/customers-are-always-right/">they shouldn’t be telling you what you should be doing</a>.<br />
See, you were hired because you have a specific expertise that they
don’t have. This is why it should be you telling the client what is best
for them. It doesn’t matter if they like what you have to say or not.
Your job as a consultant is to do what’s best for the client.<br />
If you focus on doing what’s best for them, your work will provide better results for their company.<br />
When trying to do what’s best for your client, you will run into
roadblocks. The best way to be prepared for this is to show them data
that backs up what you want to do and that shows that it is the best
solution for them.<br />
<h3>
Lesson #3: You’re worth every penny, so show it</h3>
Every once in a while, you’ll have clients who will make snarky
remarks about how much they are paying you or that they feel they can do
your job better than you can. Don’t take crap from clients; make sure
you show them that you’re worth every penny.<br />
You can do this by showing their return on investment. For example,
with my consulting company, we looked at three numbers: average revenue
per transaction, conversion rate, and search engine traffic. We used
those metrics to show how much additional revenue we brought in through
our efforts.<br />
This shows how valuable of an asset you are, assuming you are
actually providing results. The next time they are thinking about
canning you, they’ll think twice because they know you actually bring in
more money than you cost.<br />
<h3>
Lesson #4: You have to dress to impress</h3>
I already mentioned it last week, and I say it again: <a href="http://www.quicksprout.com/2011/09/12/why-you-should-dress-to-impress-%E2%80%93-the-roi-of-fashion/">you have to dress to impress</a>. The better you dress, the higher of a consulting rate you can demand.<br />
When I started off as a consultant, I dressed like a bum, and I
wasn’t able to make more than $100 an hour. Once I started to dress a
bit nicer, I was able to go up to $250 an hour. And when I dressed
really nicely, I was able to command rates in the four-figure range.<br />
Not only does a nice wardrobe show potential clients that you are
successful, but it will help boost your confidence. Plus, clients want
to pay people who are successful as they hope they can bring that same
success to their company.<br />
<h3>
Lesson #5: The more you charge, the less they complain</h3>
One of the first things I learned is that there is an inverse
correlation between how much a client pays you and how many times they
complain. In other words, the more money a client pays you, the less
they will complain.<br />
Large paying clients usually have a lot more cash, so spending it
isn’t that big of a deal. They know that if they want to continue to
grow, they have to spend money. And when doing so, sometimes things work
out, while other times they don’t, <em>but at the end of the day, they have to keep on making bets</em>.<br />
Smaller clients, on the other hand, don’t have that much money. So,
if they hire you and you mess up, they usually don’t have the luxury of
hiring someone else like the larger clients do.<br />
When you first start off, you may have to take on smaller paying
clients, but your goal should be to transition to the larger paying ones
as quickly as possible.<br />
<h3>
Lesson #6: Fake it till you make it</h3>
As I mentioned in Lesson #5, you should be going after larger paying
clients. If you don’t have a bunch of case studies or years of
experience under your belt, don’t worry. <em>You can still lock in the big guys</em>.<br />
All you have to do is figure out what separates your consulting
company from the larger ones. Big clients typically pay big consulting
companies, but if you can show why you are better than the bigger ones,
you will lock them in.<br />
At my consulting firm, I realized that clients loved the fact that I
myself would work on their projects compared to the practice of bigger
firms assigning junior consultants to them. Once I found this out, I
would tell potential clients that I personally would be working on their
projects, which they would not get with the bigger firms.<br />
<h3>
Lesson #7: When it rains, it pours</h3>
Like I mentioned earlier, you are going to lose clients. It’s just a
matter of time. Because of this, you should try to conserve as much cash
as possible. When things go south, you don’t want to have to fire
people; instead, you want to operate off your reserves.<br />
A few ways you can conserve cash is:<br />
<ol>
<li><strong>Have a cheap office</strong> – my office was cheap and
didn’t have windows. I also didn’t have fancy furniture, and I made sure
my clients didn’t see it by only doing in-person meetings at their
offices.</li>
<li><strong>Create a variable compensation plan</strong> – when my
business was doing well, my employees got compensated well. And when it
wasn’t, they didn’t. Everyone had a low base salary and earned a
percentage of the profit.</li>
<li><strong>Keep a healthy reserve</strong> – I never depleted my
corporate bank account by taking a high salary. I always left a 6-month
to a 1-year reserve in the bank before I paid myself well.</li>
<li><strong>Don’t grow too fast</strong> – even if you are constantly
getting new clientèle, don’t hire too quickly. Consider outsourcing some
of your work to a local firm before you hire new employees. This way,
if you lose a few clients, you won’t have to fire any of your staff.</li>
<li><strong>Always be closing</strong> – even when things look good, remember that someone still has it better than you. <a href="http://www.quicksprout.com/2011/09/15/7-common-sales-mistakes-and-how-to-avoid-them/">Never stop trying to bring in more clients</a> as this will help your business stay afloat.</li>
</ol>
<h3>
Conclusion</h3>
Running a consulting company isn’t easy. It’s a lot of work, and you
have tons of bosses (each one of your clients is your boss). Although it
can pay very well, at the same time it can be very <a href="http://www.quicksprout.com/2010/11/09/stress-it-does-a-body-good/">stressful</a>.<br />
If you want to reduce your stress as a consultant, make sure you <a href="http://www.quicksprout.com/2009/01/14/7-business-mistakes-that-nearly-made-me-go-broke/">learn from your mistakes</a>
and only take on clients you can actually provide results to because
being with a client is like being in a marriage. Sometimes you get into
it for the wrong reasons, and eventually it hits you in the face.<br />
So do yourself a favor, don’t get into a marriage unless you know it will work.<br />
<br />
As this article is completely copied from reference to remember in future,<br />
<a href="http://www.quicksprout.com/2011/09/19/7-lessons-learned-from-running-a-consulting-company/">http://www.quicksprout.com/2011/09/19/7-lessons-learned-from-running-a-consulting-company/</a> </div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0tag:blogger.com,1999:blog-7106786503886130541.post-1493781602430334022015-01-10T21:45:00.001-08:002015-01-10T21:45:13.186-08:00Our First Blog<div dir="ltr" style="text-align: left;" trbidi="on">
<br /></div>
Pineapple Labshttp://www.blogger.com/profile/07842528449783281921noreply@blogger.com0