Apache Handlers, running html as php

Apache handlers allow you to control what Apache will do with certain file types. When Apache sees a file, it has an action built in for that file type, and will perform that action.

If you wish Apache to do a different action, you will need to make a handler to tell Apache to perform that action. For example, if you use a file type that requires a special service to run it, such as a file with server side includes that is not named with a .shtml extension, you need to tell Apache to treat these files differently.

To get regular html pages to handle php code, you need to add this line to your htaccess file.

AddHandler application/x-httpd-php5 .html .htm

It is highly recommended that you never allow html pages to automatically handle php or shtml, because this forces all of your html pages to be processed by the server first. Instead, please rename your files to .php or .shtml whenever possible.

How to restore your SSH access using WHM Autofixer

If you are locked out and can’t SSH to your server, WHM Autofixer may help you!

Here is process to restore SSH settings and access.

1. Login to your WHM using the following URL:

https://HOSTNAME-OR-IP:2087/scripts2/autofixer

Change the HOSTNAME-OR-IP as appropriate for you.

2. In the Autofixer interface, put the name safesshrestart as shown on the image.

WHM SSH Autofixer

3. Hit the Submit button.

This will restore your SSH configuration and restart your sshd! You should be able to login easily after that!

cPanel Daily Process Log (formerly CPU/Memory/MySQL Usage)

(Main –>> Server –>> Daily Process Log)

This feature displays information about your server’s consumption of processing power and memory, averaged over the course of the selected day.

The information is divided into rows and columns. Each row represents a different process running on your server while each column represents the processes’ associated parameters.

The processes running on your server will depend on how you have configured WHM and what other daemons and applications you install on your server.

The column information is divided into 5 categories:

User — Displays the name of the user running the process. For example, if you are logged into your server as “root,” then that username will appear in this field for any processes you initiate.
Domain — Displays the domain name associated with your cPanel user accounts.
%CPU — Displays the average daily percentage of the CPU’s processing power used by the corresponding process.
%MEM — Displays the average daily percentage of RAM used by the corresponding process.
MySQL Processes — Displays the average number of MySQL processes associated with the corresponding process for today.

Apache MPM Common Directives

Description: A collection of directives that are implemented by more than one multi-processing module (MPM)

Description: Method that Apache uses to serialize multiple children accepting requests on network sockets
Syntax: AcceptMutex Default|method
Default: AcceptMutex Default
Context: server config
Status: MPM
Module: prefork, worker

The AcceptMutex directives sets the method that Apache uses to serialize multiple children accepting requests on network sockets. Prior to Apache 2.0, the method was selectable only at compile time.

mod_bandwidth : APACI & APXS installation

WARNING: It is very important to give the lowest priority to mod_bandwidth so other modules will have the time to do their job before the documents are transmited ! For that reason, it is important to follow those steps :

APACI installation

* Copy the file mod_bandwidth.c to your Apache source directory.
* Run the ./configure script with the following directives :
–add-module=mod_bandwidth.c –permute-module=BEGIN:bandwidth
* Compile and install Apache.

APXS installation

* Compile the module with :
/path_to_apache/bin/apxs -c /path/mod_bandwidth.c -o /path_to_apache/libexec/mod_bandwidth.so
* Add the following lines to your httpd.conf file :
LoadModule bandwidth_module libexec/mod_bandwidth.so
AddModule mod_bandwidth.c

Those directives should be placed at the begining of the list so that the module will be given the lowest priority and be executed after others modules.

Reference: http://www.cohprog.com/v3/bandwidth/doc-en.html

« Prev - Next »