Server

what is CDN?

A content delivery network (CDN) is a system of distributed servers (network) that deliver pages and other Web content to a user, based on the geographic locations of the user, the origin of the web-page and the content delivery server.

What is Git?

Git is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for software development, but it can be used to keep track of changes in any files

git cd thirstysix
git add *
git status
git commit -am "Message"
git push origin master

Uses Pantheon Hosting Drupal

Pantheon is a website management Platform for drupal.

 * Developer Dashboard
 * one-click core updates
 * Use Git for version control,
 * dev, test, live environments
 * Advanced Caching (Varnish & Redis are built in to the platform)
 * Backup & Retention

We are update the files using git commands like git clone, git add, git commit, git push ... etc

URL redirect rewrite using the .htaccess file

Create a 301 redirect for all http requests that are going to the old domain to new domain

If you are wanting to only redirect a specific subdomain, you would do something like this:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^olddomainname.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.olddomainname.com$
  RewriteRule (.*)$ http://www.newdomainname.com/$1 [R=301,L]
</IfModule>

[or]
  
Redirect  301 /olddomainname http://www.newdomainname.com

URL redirect rewrite using the .htaccess file

Create a 301 redirect for all http requests that are going to the old domain to new domain

If you are wanting to only redirect a specific subdomain, you would do something like this:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^olddomainname.com$ [OR]
  RewriteCond %{HTTP_HOST} ^www.olddomainname.com$
  RewriteRule (.*)$ http://www.newdomainname.com/$1 [R=301,L]
</IfModule>

[or]
  
Redirect  301 /olddomainname http://www.newdomainname.com

Installation PHP SOAP on CentOS7 in PHP7

Install "php-soap":
sudo yum install php70w-soap

Terminal:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.digistar.vn
* epel: epel.mirror.srv.co.ge
* extras: centos-hn.viettelidc.com.vn
* nux-dextop: mirror.li.nux.ro
* updates: mirror.digistar.vn
* webtatic: sp.repo.webtatic.com

Installation PHP, Apache, MySQL, PhpMyAdmin On Ubuntu

sudo apt-get update
sudo apt-get upgrade (optional)

MySQL
=====
sudo apt-get install mysql-server mysql-client

Apache
=====
sudo apt-get install apache2

PHP
===
sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Restart Apache
===========
/etc/init.d/apache2 restart

PHPMyAdmin
==========
sudo apt-get install phpmyadmin

I don’t like to use Apache’s default http folder /var/www so I need to update the apache2.conf file:
sudo gedit /etc/apache2/apache2.conf

Clean URLs with Apache 2 on Ubuntu

Open terminal: Ctrl+Alt+T

1)  sudo a2enmod rewrite
2) sudo apache2ctl -M   (and seeing if rewrite_module is on the list.)
3) sudo gedit /etc/apache2/sites-available/default
4) change text "AllowOverride None" to "AllowOverride All"
5) sudo /etc/init.d/apache2 reload

 

If you are running Ubuntu 14.04+:
sudo gedit /etc/apache2/apache2.conf
Otherwise:
sudo gedit /etc/apache2/sites-available/default

Refer: https://www.drupal.org/node/134439

500 – Internal server error from IIS on Windows server

Open a web.config file in root folder & add this line  <httpErrors errorMode="Detailed" />

Ex:
 <system.webServer>
 ..................................... 
// comment below lines
 <!--<httpErrors>-->
      <!--<remove statusCode="404" subStatusCode="-1" />-->
      <!--<error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />-->
 <!--</httpErrors>-->
........................................

 // Add this line 
 <httpErrors errorMode="Detailed" />
</system.webServer>

Drupal 7 Cron Jobs in GoDaddy

Cron Job Manager Command:

wget -O - -q -t 1 "http://<your-domain>.com/cron.php?cron_key=<your-key>"

 

Drupal 7 Run Elysia cron on every Minute using crontab

* * * * * wget -O - -q -t 1 http://your-site-name/sites/all/modules/contrib/elysia_cron/cron.php?cron_key=

[Minute] [hour] [Day_of_the_Month] [Month_of_the_Year] [Day_of_the_Week] [command]

Edit/List Jobs in Crontab
# crontab -e
# crontab -l
# crontab -u -l
# crontab -u (username) -l

Refer: How to Install Crontab in CentOS/RHEL 7/6/5
http://tecadmin.net/install-crontab-in-linux
http://tecadmin.net/crontab-in-linux-with-20-examples-of-cron-schedule/

Instagram Without API

Could not reach Instagram server