Web Solutions and Technical Support Resources

Configure Varnish with Apache - How to do it

This article covers how to configure Varnish #cache on the #Apache server. Varnish is an HTTP accelerator and a useful tool for speeding up a server, especially during a times when there is high traffic to a site. 

It works by redirecting visitors to static pages whenever possible and only drawing on the virtual private server itself if there is a need for an active process.

#Varnish is a caching HTTP reverse proxy. It receives requests from clients and tries to answer them from the cache.

Where is varnish configuration file?

The Varnish configuration file will be located in the /etc/varnish directory in CentOS 7. 

To make Varnish work in front of Apache, you will need to set up some basic configurations. 

By default Varnish listens on port 6081 . 

You will need to change port 6081 to 80 so that website requests access the Varnish cache first.

What is varnish WordPress?

Varnish is a full-page cache and HTTP preprocessor which can be used to speed up requests for a WordPress site. 

Setting up Varnish is a technical task, as it requires installing and configuring a system package on a web server, rather than just installing a plugin.

Read More

The Windows Installer Service could not be accessed error - Fix it now

This article covers methods to resolve the Windows #Installer Service could not be accessed #error which occurs while we try to install a program in Windows or when you are running Windows in safe mode.

Windows Installer popups may be caused by Windows configuration issues, by Windows Update prompting you to install updates or by malware.

To fix #Windows installer error:

1. Click Start. , type services.

2. Right-click Windows Installer, and then click Properties.

3. If the Startup type box is set to Disabled, change it to Manual.

4. Click OK to close the Properties window.

5. Right-click the Windows Installer service, and then click Start.

6. Try to install or to uninstall again.

To fix error 1719 windows installer service could not be accessed:

1. Start the Windows Installer Service.

2. Stop and then Restart Windows Installer Service.

3. Reset the settings of Windows Installer Service in the registry.

To to Disable Windows Installer:

1. Log into Windows. Click the "Start" button.

2. Double-Click "Group Policy" in the left pane.

3. Expand the tree in the left side of the pane, "Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Window Installer".

4. Double click "Disable Windows Installer.

To enable Windows Installer in Safe Mode:

1. Press Windows + R, type cmd, and press Ctrl + Shift + Enter to run CMD as administrator. 

2. Type the command net start msiserver in Command Prompt window, and press Enter to enable Windows Installer in Safe Mode in Windows 10.

Read More

Best Server Monitoring Software Products - Advantages and Disadvantages

This article covers the Best Server Monitoring Software. Basically, Server management software takes the burden of managing servers and other critical applications.

Reporting and monitoring is critical in business, especially when it comes to IT infrastructure such as network connectivity and server monitoring.

Being able to look back at historical trends and faults is especially useful when troubleshooting an issue on a critical server or service, so if you don’t already have a solution in place, then it might be time to seriously consider it.

Server Monitoring Software is able to check everything about your system, such as:

1. CPU usage

2. RAM utilization

3. Hard Disk Space

4. System Temperatures

5. Server Alerts (Hardware status warnings)

6. RAID Array health checks

7. Virtual Machine Alerts

8. You can also monitor user logins, suspicious activity on your server, and the status of your services and daemons

Best server monitoring software and tools includes:

1. SolarWinds Server & Application Monitor - Tracks the statuses of key server components and also watches the performance of applications running on each server. The tool runs on Windows Server but can also monitor Linux servers across a network.

2. Atera - A remote monitoring and management system that includes server monitoring features. Ideal for managed service providers.

3. Site24x7 Server Monitoring - A cloud-based monitoring system that can track the statuses of Windows and Linux servers as part of a company’s infrastructure.

4. ManageEngine Applications Manager - A server and applications monitoring system that includes extra capabilities such as VM monitoring. Runs on Windows Server and Linux.

5. Paessler PRTG - A package of monitors that includes a range of server status trackers. Installs on Windows Server.

6. Nagios XI - A comprehensive infrastructure monitoring system that includes live server monitoring services. Installs on Linux.

7. Opsview - A system monitoring tool that includes sever monitoring and is billed as an alternative to Nagios XI. Runs on Linux.

8. Zenoss - A system monitoring tool that includes a server monitoring module and is also available in a free version. Installs on Linux.

9. OP5 - Monitor Server monitoring as part of a system-wide monitor tool that accepts Nagios plug-ins. Install on Linux.

10. AppOptics - A cloud-based server and applications monitoring system that will track the performance of Windows and Linux servers.

11. Monitis - A cloud-based monitoring system that specializes in tracking the performance of Web servers and Web applications.

12. ManageEngine Free Windows Admin Tools - A collection of 15 free tools that cover different aspects of server monitoring including disk space, software inventory, and user lists.

What is server maintenance?

Server maintenance is process of keeping a server software updated and running so that a computer network can operate smoothly and avoid downtime or loss of data. Regular maintenance will keep the server running as expected and will help avoid a total or partial network failure.

Read More

SELinux on CentOS 7 - Set it up now

This article covers how to set up SELinux on #CentOS 7. #SELinux is a security mechanism built into the Linux kernel. Linux distributions such as CentOS, RHEL, and Fedora are equipped with SELinux by default.

SELinux improves server security by restricting and defining how a server processes requests and users interact with sockets, network ports, and essential directories.

To check SELinux mode:

The easiest way on how to check SELinux ( Security Enhanced Linux ) operation mode is to use getenforce command. 

This command without any options or arguments will simply print a current status SELinux operational mode. 

Furthermore, the current status of SELinux operational mode can be set permanently or temporarily.

To check whether SELinux is enabled or not:

1. Use the getenforce command. [vagrant@vagrantdev ~]$ getenforce Permissive.

2. Use the sestatus command.

3. Use the SELinux Configuration File i.e. cat /etc/selinux/config to view the status.

To configure SELinux to enforcing mode:

1. Open the /etc/selinux/config file in a text editor of your choice, for example: # vi /etc/selinux/config.

2. Configure the SELINUX=enforcing option: # This file controls the state of SELinux on the system.

3. Save the change, and restart the system: # reboot.

To enable SELinux without rebooting:

1. Changing the SELinux mode at run time. If SELinux is disabled it cannot be enabled without rebooting.

2. To detemine the current Mode of SELinux.

3. Changing the SELinux mode Permanently. In the /boot/grub/grub.conf file add a line: selinux=0.

4. Or in /etc/sysconfig/selinux change.

To permanently change mode to permissive:

1. Edit the /etc/selinux/config file as follows: # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced.

2. Restart the system: $ reboot.

Read More

Install and Configure Mahara on Ubuntu

This article covers how to install Mahara. Basically, Mahara is a popular ePortfolio and social networking system that helps educators to develop a digital classroom in a remote learning environment and track student's progress. 

Mahara also has many non-student applications. You can use it to build a blog, a resume-builder, a file-repository, or a competency framework.

Mahara is a fully featured web application to build your electronic portfolio. 

You can upload files, create journals, embed social media resources from the web and collaborate with other users in groups. 

To install Mahara on Ubuntu:

1. 1. Login to your VPS via SSH

ssh user@vps

2. Update the system

[user]$ sudo apt-get update && sudo apt-get -y upgrade

3. Install MariaDB

To install MariaDB, run the following command:

[user]$ sudo apt-get install -y mariadb-server

4. Create MariaDB database for Mahara

Next, we need to create a database for our Mahara installation.

[user]$ mysql -u root -p
MariaDB [(none)]> CREATE DATABASE mahara character set UTF8;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mahara.* TO 'maharauser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> \q

Do not forget to replace 'your-password' with a strong password.

5. Install Apache2 Web Server

Install Apache2 web server

[user]$ sudo apt-get install apache2

6. Install PHP

Install PHP and required PHP modules

To install the latest stable version of PHP version 5 and all necessary modules, run:

[user]$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd

7. Download and extract Mahara

Download and extract the latest version of Mahara on your server:

[user]$ sudo cd /opt && wget https://launchpad.net/mahara/16.04/16.04.1/+download/mahara-16.04.1.zip
[user]$ sudo unzip mahara-16.04.1.zip
[user]$ sudo mv mahara-16.04.1 /var/www/html/mahara
Create Mahara’s upload directory
[user]$ sudo mkdir /var/www/html/mahara/upload/

8. Configure Mahara

Create Mahara’s config.php

In the Mahara ‘htdocs’ directory there is config-dist.php file. Make a copy of this called config.php.

[user]$ cd /var/www/html/mahara/htdocs/
[user]$ sudo cp config-dist.php config.php

Open the config.php and make the necessary changes where appropriate.

[user]$ sudo nano config.php
$cfg->dbtype   = 'mysql';
$cfg->dbhost   = 'localhost';
$cfg->dbport   = null;
$cfg->dbname   = 'mahara';
$cfg->dbuser   = 'maharauser';
$cfg->dbpass   = 'your-password';
$cfg->dataroot = '/var/www/html/mahara/upload/';

All files have to be readable by the web server, so we need to set a proper ownership

[user]$ sudo chown www-data:www-data -R /var/www/html/mahara/

9. Configure Apache Web Server

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘mahara.conf’ on your virtual server:

[user]$ sudo touch /etc/apache2/sites-available/mahara.conf
[user]$ sudo ln -s /etc/apache2/sites-available/mahara.conf /etc/apache2/sites-enabled/mahara.conf
[user]$ sudo nano /etc/apache2/sites-available/mahara.conf
Then, add the following lines:
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/mahara/htdocs/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/mahara/htdocs/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common

10. Restart and Verify

Restart the Apache web server for the changes to take effect:

[user]$ sudo service apache2 restart

Open your favorite web browser, navigate to http://your-domain.com/ and if you configured everything correctly the Mahara installer should be starting.

Read More

Jenkins setup with Docker and JCasC - Automate it now

This article covers how to perform Jenkins Configuration as Code (JCasC) method which can help us to automate the setup of Jenkins using Docker. 

This will automate the installation and configuration of Jenkins using Docker and the Jenkins Configuration as Code (JCasC) method.

Jenkins uses a pluggable architecture to provide most of its functionality. 

JCasC makes use of the Configuration as Code plugin, which allows you to define the desired state of your Jenkins configuration as one or more YAML file(s), eliminating the need for the setup wizard. 

On initialization, the Configuration as Code plugin would configure Jenkins according to the configuration file(s), greatly reducing the configuration time and eliminating human errors.

Just as the Pipeline plugin enables developers to define their jobs inside a Jenkinsfile, the Configuration as Code plugin enables administrators to define the Jenkins configuration inside a YAML file. 

Both of these plugins bring Jenkins closer aligned with the Everything as Code (EaC) paradigm.

Read More