Tag Archives: apache

How to Enable SSL in Apache2 on Ubuntu

In this tutorial, I’ll explain you that how to enable the SSL for your website under Apache2 on Ubuntu Server. For this, I’m assuming:

1. That you have a working apache2 setup on your Ubuntu Server.

2. You have correctly configured the dns records for your domain.

3. You already got a certificate from a trusted certificate authority (CA) such as Godaddy,Verisign, Comodo, etc.

Let’s verify our web server that it is up and running, before beginning this tutorial:



Read more of this post

How To Install WordPress in Ubuntu Server 12.04 LTS

Install the LAMP Server (Linux,Apache, Mysql, PHP) with the command below:

sudo apt-get install lamp-server^

It will prompt for mysql server root password, enter the root password:

Read more of this post

Fixing httpd: [warn] module php5_module is already loaded, skipping

I have a CentOS webserver with the Apache and PHP installed on it and it works perfectly but when I restart the Apache service, I get this error:

[warn] module php5_module is already loaded, skipping

To solve this problem, I have to verify this module load call in two files and need to remove/comment from one of these file.

First, I need to check Apache main file:

sudo nano /etc/httpd/conf/httpd.conf

Read more of this post

Simple failover cluster using UCARP on Ubuntu

In this tutorial, I’ll show you the steps to create a simple failover cluster on Ubuntu using CARP. To make the things meaningful,we’ll create the cluster for Apache service but you can use it for any other service, which relay on IP.


Here is my Setup:

PrimarySrv: This is the main server, where I configured the apache and which act as Master (IP:
SecondarySrv: 2nd Apache Server where I configured the apache exactly like on PrimarySrv (IP : : Virtual IP address,created using Ucarp.

Ucarp is really simple, it works like this,when the PrimarySrv is up,it will assign the virtual IP to it, in case that PrimarySrv is down then it will assign virtual IP to the SeconadrySrv and when the PrimarySrv will come online, it will assign the virtual IP once again to it.

I assume that you configured Apache server already according to the above scenario, Let’s test it for PrimarySrv:

For SecondarySrv:

Read more of this post

How to recover deleted Apache Log

Scenario: The server is running Apache and by mistake one of the log files gets deleted. How, we can recover it?

Currently, Apache server is working perfectly:

Login/Switch to as root user:

Move to the httpd in log directory:

cd /var/log/httpd

Delete the log file:

rm -f access_log

So the log file has been deleted,now find the process number for main apache procees that owned by root:

ps aux | grep httpd

In this case, the pid for the main apache process is 1784.

Now lets list the file descriptors:

ls -lsa /proc/1784/fd

Stop the apache service:

service httpd stop

Now copy the access log file that is marked as deleted (In this case it is 7) into the log directory:

cp /proc/1784/fd/7 /var/log/httpd/access_log

Start the apache service again:

service httpd start

Access the webpage again from your server:

Verify the log file:

tail -f /var/log/httpd/access_log

It’s working 🙂

Hope this will help you!

Please Remember me in your prayers!

XAMPP – Apache service not working on Windows Xp

I’ve been installing XAMPP on Windows 7 for 2 to 3 times, which is always a simple install and Apache/PHP works fine. However, yesterday with the 1.8.0 version, I get the same problem on two Windows XP machines, here is what I downloaded:

It installed successfully without any errors:

MySQL works fine, but when I hit the “Start” button to start Apache it says “Running” and then it stops running again in like 2/3 secs:

I had tried every possible way to free the port 80. For example, Disabled option that “Use port 80” in Skype and Teamviewer as well. But, still no luck:

The solution to this problem is really simple, just download and install Microsoft Visual C++ 2008 SP1 Redistributable Package (x86):

Then hit the “Start” button to start Apache:

Type http://localhost/ and hit Enter, this time it will present you with the xampp default web page:

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

apache2: Could not reliably determine the server’s fully qualified domain name, using for ServerName

After the initial install of Apache server, I got the following error while restarting the Apache service on Ubuntu 12.04:

The solution is really simple, just  add ServerName directive to /etc/apache2/httpd.conf :

 sudo nano /etc/apache2/httpd.conf


ServerName localhost

Finally restart the Apache server:

sudo /etc/init.d/apache2 restart

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: