Categories
Articles

How to Configure Apache, PHP & MySQL

This guide will show you how to update and configure Apache, PHP and MySQL on a cPanel web server so that you can resell hosting services to your clients.

Apache

The Apache (HTTP Server) refers to a cross and open-source platform software that follows the Apache License 2.0. A community of developers under the patronage of the Apache Software Foundation created and maintain said program. As of June (2017), around 92% of the HTTP server copies function on Linux distributions. The Version 2.0 facilitated support for OS not under UNIX like Windows and OS 2. Apache’s older versions were connected to the NetWare and Open VMS computer network operating systems.

PHP

PHP means a server-side scripting type of language originally for website development but later on used as programming language with a general purpose. You can embed PHP codes into Hypertext Markup Language (HTML or HTML 5). PHP can be combined with different web template as well as content management systems, and web frameworks.

A PHP interpreter processes the code and implements it as module in the server or the executable Common Gateway Interface (CGI). This server software puts together the results of interpreted and implemented PHP Code. It can include any kind of data like images with the generated page. The code may be accomplished using a Command Line Interface (CLI) for implementing separate graphical apps.

MySQL

MySQL is an open-source relational (relation of syntax) database management system or RDBMS. It is a central element of the LINUX, APACHE, MYSQL, and PERT/PHP/PYTHON or LAMP. It is considered as the most popular open-source database globally which allow cost-efficient delivery of dependable, scalable, and high-performance web-based as well as embedded structured set of data applications.

LAMP and WAMP

LAMP comprises a standard or conventional model of web service protocol stacks. The protocol stack defines, detects, conducts, and facilitates interaction between different web services. LAMP elements are not confined to the original collection and remain essentially interchangeable. This stack can build dynamic websites and web apps. The model was modified to fit other components by means of other open-source software.

WAMP (Windows, Apache, MySQL, and PHP) emerged as a deviation from LAMP for Windows and frequently installed as software package for web development as well as internal tests or serve live websites. Apache is the crucial component of WAMP and runs on the local server on any Windows device. Web developers can test pages in a web browser without having to publish these pages online.

So far, PHP and MySQL comprise the two most prevalent technologies to build vibrant and motivating websites. The two open-source components along with Apache may be installed separately or together. The “WAMP Server” represents one well-liked package capable of providing an easy to use method of installing and configuring AMP elements on Windows.

Apache Server

A joint software development initiative described as the Apache HTTP Server was designed to create a sound and commercial-grade implementation of HTTP web server complete with extra features and free implementation of source codes. Volunteers worldwide managed the project utilizing the Internet in planning, communicating, and developing the Apache Server together with pertinent documentation.

Due to its popularity, the Apache HTTP Server serves more than 46% of all existing sites. PHP and MySQL turned out as the basis of many portals which include one of the most preferred platforms, WordPress. You will eventually find out the process of updating and configuring these elements in a cPanel server for the process of reselling hosting services to your clients.

Upgrading of cPanel

It is not compulsory to improve cPanel in configuring web services. Nonetheless, experts recommend the use of the most recent Web Host Manager (WHM) version because it ascertains updating of software packages required by the server.

Step 1: Login to the Web Host Manager (http://[yourserver’sIPaddress]:2083 or [http://your server’s IP address]:2087).

Step 2: Locate the main menu.

Step 3: Click on cPanel>Upgrade to the latest version.

Step 4: Hit Click to Upgrade. The process will only take several minutes.

Upgrading of MySQL

In specific circumstances, the default installation of the MySQL Server might be obsolete. Thus, it is advisable to conduct an upgrade ahead of actual website hosting and avert unnecessary downtime as well as broken databases. You might consider performing this upgrade prior to updating PHP.  With this move, you can compile with the correct MySQL libraries.

Step 1: Login to the WHM.

Step 2: Look for the main menu.

Step 3: Click on the Software> MySQL Upgrade.

Step 4: Choose the most recent constant version of MySQL (currently 5.5) and click on Next.

Step 5: WHM will give a warning regarding possible issues in upgrading MySQL. Check the warning boxes and click on Continue.

Step 6: On the following page, WHM will ask about handling the upgrade. Choose, “I will manually rebuild Apache and PHP when the MySQL upgrade is completed.” Click on Continue.

Step 7: The upgrade may take time which depends on the server’s performance.

Updating Apache and PHP

You can look forward to a straightforward configuration of Apache, MySQL, and PHP on a cPanel. This panel provides an installation genius called EasyApache that will serve as guide through installation and compilation of Apache and PHP.

Step 1: Login to WHM.

Step 2: Choose Software> EasyApache from the main menu.

Step 3: Choose the previously saved Config from the list of profiles and click on Start customizing based on profile.

Step 4: Look for the latest consistent version (currently 2.4.6) of Apache. Click Next Step button.

Step 5: Look for the latest consistent version (currently 5.4.19) of PHP. Click Next Step button.

Step 6: You will see several options in the next page. Scroll down to the bottom of the page. Click Exhaustive Options List.

Step 7: Choose the options and click Save and Build once finished.

Apache Built-in Modules:Other Modules:PHP:
AsisIonCube LoaderBcmath
AuthnDefaultMod BandwidthMz2
DeflateMod CloudflareCGI
EnvMod SecurityCalendar
Expries CurlSSL
Mod FCGID Curlwrappers
Fileprotect Exif
Headers FTP
MPM Prefork GD
MemCache Gettext
Mod SuPHP Iconv
Proxy Imap
UniqueID Mbregex
Version Mbstring
  Mcrypt
  Mysql
  Mysql of the system
  MySQL “Improved” Extension
  Openssl
  POSIX
  Path Info Check
  Pear
  PGsql (Optional – if you plan to provide PostgreSQL support)
  Phar
  Pspell
  SOAP
  SQLite 3
  Safe PHP CGI (optional)
  Sockets
  System Timezone
  TTF (FreeType)
  Tidy
  XmlRPM
  Zip
  Zlib
  Save my profile with appropriate PHP 5 options so that it is compatible with cpphp

It is important to note that depending on whether you are using a VPS or a dedicated server, some of these options may or may not be available.

The process of creating Apache and PHP usually takes longer particularly on the VPS. Avoid closing or refreshing your browser. The process will keep on running in the background if you lose your connection to the WHM even before the development is completed. You may have to install the other modules for individual requirements.

Configure PHP and suEXEC

Change the default PHP handler after you finish building Apache and PHP.

Step 1: Click Service Configuration >Configure PHP and suEXEC from the main menu of WHM.

Step 2: Fix the default version of PHP to 5.

Step 3: Choose suphp as the PHP 5 Handler.

Step 4: Turn on suEXEC.

Step 5: Click Save New Configuration.

When you enable suphp, all files created through the process will become part of the user account instead of the user account that runs Apache. This preventive approach will preclude malicious scripts from gaining access to files in other users’ directories. Apache suEXEC permits users to run both SSI and CGI programs under their users rather than the user ID maintaining the HTTP process averting possible security problems.

Need for Web Services

Industry experts cite the need for integration of unrelated systems and sharing of business sense inside and outside any enterprise. Website services control or shape the economic benefits as well as interoperability of Extensible Mark-up Language or XML. However, these services call for a system of more network and computing services compared to previous systems. The action slows down performance and waste valuable resources.

Highly-efficient website services can achieve the following:

  • Improve web service throughput significantly.
  • Enhance use of network and scalability.
  • Unclog overcrowded networks.
  • Allow the web service to be utilized economically instead of slow and bandwidth-restricted networks.

The plug-in includes cost-effective XML capabilities to the present service platform without having to add, alter, or replace one line of codes. Upon installation and configuration, it automatically detects and makes use of an efficient XML or EXI when available but reverts to the old XML if it is not available. There are multiple features and upsides which include the following:

  • Fundamental and straightforward configuration
  • No code changes in applications
  • Interoperability
  • Enhanced application performance

The Advantages of cPanel

The cPanel ensures a seamless client interface which promises easy navigation using an icon-based menu on the main web page and links users to essential features the control panel offers. This hosting control panel supports majority of operating systems for servers. Nearly all web hosting providers opt for cPanel which remains as the biggest trademark in the hosting control panel business. The panel provides clients with familiarity and peace of mind due to the system’s stability.

Industry stakeholders point to this control panel as a low-priced solution if bought in a data center. A number of dedicated service suppliers partnered with cPanel for cheaper licenses. The panel allows easy incorporation of third-party apps into control panel software. On the other hand, cPanel Pro represents an add-on for the control console including a fixed support submission form. Finally, cPanel ensures easy navigation which many design firms have realized and use to their advantage.

Hosting providers provide auto installers or packages devoted to popular content management systems such as WordPress. You can access cPanel by using https on the port 2038 or basically affixing “c/panel” at the end of the host name. Administrators together with end-users have the capability to regulate the various aspects of servers and websites directly through their respective browsers. Tools are provided to make operations in controlling a website simpler and allowing website control.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.