Thursday, November 17, 2016

A Day in the Life of a Programmer







The reality of being a programmer is somehow portrayed on this GIF. This situation merely happens when a newbie programmer seeks help from a fellow programmer.
Sometimes, it is also a challenge for an expert programmer to extend help to our fellow programmer; but yes, reaching out a hand should never be a worry.
I hope you can relate on this GIF, and gracefully extend your expertise to help or teach those who are in need of you.
Though programming is hard to understand and to solve, it is always fun; and can even be more enjoyable with hands helping each other.

Wednesday, November 16, 2016

Tuesday, November 15, 2016

CENTOS WEB PANEL – SYSTEM REQUIREMENTS



Make sure that you complete the following tasks before you start the installation process:

1. Setup Hostname

This hostname cannot be the same as any domain that is on your server (for example, if example.com is a domain on your server, use hostname.example.com as your fully qualified hostname).

You can use the following command for hostname setup eg. srv1.example.com
hostname srv1.example.com
2. Setup Server IP addresses

  • Define additional IP address, subnet address, and default gateway IP address for your server — your service provider can provide you with this information.


3. Software Requirements

  • You must have a clean/fresh installation of supported operating systems:
  • CentOS 6, RedHat 6 or CloudLinux 6, MINIMAL installation and English version only!
  • CentOS 7 is NOT supported.


4. Hardware Requirements

  • 32 bit operating systems require a minimum of 512 MB RAM
  • 64 bit operating systems require a minimum of 1024 MB RAM (recommended)
  • Recommended System: 4 GB+ RAM so you would have the full functionality such as Anti-virus scan of emails.

Monday, November 14, 2016

Host Multiple Domains on One Server/IP with Apache or nginx

Configure Apache/Nginx to host multiple websites
If you are on dedicated or VPS like DigitalOcean or any other server and planning to host multiple websites on a single server then here is how you can do it either with Apache HTTP or Nginx web server.
This assumes you have already mapped DNS to your host, like following two domains I have mapped to DigitalOcean.
  1. bestflare.com
  2. usefulread.com
Before you implement this, to give you an idea how it works. The concept to have multiple websites on a single instance is called Virtual Server. Virtual server configuration is defined within web server configuration and based on server/IP address, a request is getting forwarded to respective Document Root.

Configure Virtual Host in Apache to host multiple domains

  • Login into Apache HTTP Server
  • Go to apache conf location. ( in default installation – you will find it here /etc/httpd/conf/httpd.conf)
  • Take a backup of httpd.conf file
  • Create a VirtualHost container like below I have done for two domains.
<VirtualHost *:80>
ServerAdmin hello@chandank.com
   DocumentRoot /opt/htdocs/bestflare
   ServerName bestflare.com
   ErrorLog logs/bestflare.com-error_log
   CustomLog logs/bestflare.com-access_log common
</VirtualHost>
<VirtualHost *:80>
   ServerAdmin hello@chandank.com
   DocumentRoot /opt/htdocs/usefulread
   ServerName usefulread.com
   ErrorLog logs/usefulread.com-error_log
   CustomLog logs/usefulread.com-access_log common
</VirtualHost>
Note: Change the value for ServerAdmin, DocumentRoot, ServerName, ErrorLog, CustomLog based on your requirement.
  • Restart Apache HTTP and test both urls.

Configure Virtual Host in Nginx to host multiple domains

  • Login into Nginx server
  • Go to virtual.conf location (in default location – you will find it here /etc/nginx/conf.d/virtual.conf)
  • Take a backup of virtual.conf
  • Create server block for both URL’s as I have shown below.
server {
listen 80;
   root /opt/htdocs/bestflare;
index index.html index.htm;
   server_name bestflare.com;
   location / {
       try_files $uri $uri/ =404;
   }
}
server {
   listen 80;
   root /opt/htdocs/usefulread;
   index index.html index.htm;
   server_name usefulread.com;
   location / {
       try_files $uri $uri/ =404;
   }
}
Note: Change the value for root, server_name based on your requirement.
  • Restart Nginx and test both URL’s

Why We Love OpenCart

1. OpenCart is Free

2. Open-Source, Customizable and Flexible

3. Responsive Design

4. Free and Paid Functionality Extensions

5. SEO Ready

6. Analytics, Statistics and Advanced Data Tracking

7. Secure Payment and Shipping Methods

8. Multi-Store and Multi-Lingual Capabilities

9. Coupons, Specials, Reward Points and Gift Vouchers

10. Large User Base and Community


Sunday, November 13, 2016

Saturday, November 12, 2016

How TO Setup Remote Backup CWP


Instructions for adding ssh pub key on the remote backup server.
Replace the USERNAME with the existing username on the remote server, it’s not recommended to use the root user.
This instructions are only for the backups on the remote server.
To Enable remote backup in your CWP.admin go to CWP Settings –> Backup Configuration
You will need to enter the login details into the fields of “Remote Backup Settings”
Don’t forget to generate the new remote access Key.
On the remote backup server you need to add the pub key
cd ~USERNAME
mkdir .ssh
chmod 700 .ssh
nano .ssh/authorized_keys

Now add all content from the file /root/.ssh/backup/id_rsa.pub to .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
chown -R USERNAME:USERNAME .ssh
chown USERNAME:USERNAME .ssh/authorized_keys
You can use test connection button in CWP.admin to check connectivity with the remote backup server.
To connect and check content on the backup server you can use ssh key access:
ssh USERNAME@SERVER-IP -i /root/.ssh/backup/id_rsa