Posts Under Category: apache

By default Apache loads lots of modules which probably you do not need. If you want to optimize Apache on your VPS / Dedicated server, you should consider disabling un-needed Apache modules. Disabling un-necessary modules will save lots of memory and optimize server. In this tutorial I will explain how to disable un-needed Apache modules on a CentOS / RedHat server / VPS.
read more

In this tutorial I will explain how to install and setup LAMP on a RHEL/CentOS Linux 6.x server.
Before I start the tutorial, let’s know what is LAMP. LAMP stack is a group of open source software used to get web servers up and running. LAMP stands for Linux, Apache, MySQL, and PHP.
read more

If Apache / HTTPS is using lots of memory on your server, here is how you can optimize Apache on your server / VPS.
Login as root in WHM and navigate to:

WHM Home >> Service Configuration >> Apache Configuration >> Global Configuration

And change value of Max Connections Per Child. Default value of Max Connections Per Child is 10,000
You should reduce this value to 1000. This will greatly reduce memory usage by Apache on your server.

Our Recommended VPS Hosting

For security reason, it is recommended that you disable directory listings / indexing on your server. Apache default configuration comes with this feature enabled but its always a good idea to get it disabled unless you really need it.

When this option is enabled, user can see the list of files / folder of a directory when no index file is present.
apache-directory-index

With Apache listings / indexing option disabled, user will not be able to see content of a directory in absence of a index file.

Here is how you can disable this on a cPanel server.

Step 1

Login to your server WHM as root.

Step 2

Navigate to:
WHM Main >> Service Configuration >> Apache Configuration >> Global Configuration

Step 3

Under Directory ‘/’ Options >> uncheck Indexes >> Save >> Restart Apache

apache-directory-index-2

Done!!

Our Recommended VPS Hosting

Login to your server as root via SSH and run below command:

To start Apache

service httpd start

To stop Apache

service httpd stop

To restart Apache

service httpd restart

Our Recommended VPS Hosting

Login as root to your server via SSH and run following command:

httpd -v

This will show you the Apache version installed on your server.
apache-version

Our Recommended VPS Hosting

If you have just received a fresh dedicated server / vps with only operating system installed, Apache may not be installed on your server. By default, Apache is not install with OS.

Here is how you can install Apache on your server.
Login to your server as root via SSH and run following command:

yum install httpd

During installation you will asked to allow download of package. Press y to allow download of package.
It will take 1-2 minutes to complete installation.
install-apache

After installation you may need to start Apache. Run following command to start Apache

service httpd start

Now open your server IP in any browser. You should get default Apache page.
default-apache-page

Our Recommended VPS Hosting