Customizing apache web logs
Custom formats for apache web logs, to record more information or to make them easier to read.
LogFormat
%h The remote host
%l The remote logname (usually just “-”)
%u The authenticated user (if any)
%t The time of the access
\”%r\” The first line of the request
%>s The final status of the request
%b The size of the server’s response, in bytes
\”%{Referer}i\” The referrer URL, taken from the request’s headers
\”%{User-Agent}i\” The user agent, taken from the request’s headers
Apache’s “LogFormat” directive is what lets you define your own access log setup. Let’s look at how that directive would be used to define the combined log format (CLF):
LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined
That first argument, in quotes, is the string that describes the log format. The last argument, “combined”, gives a nickname to the format that can be used by CustomLog later on.
That format string contains a bunch of placeholders that describe the data to be included in the log. That first one, for example, is “%h” and represents the IP address of the visitor (the identifier for their host). A bit further on, “%t” represents the time of the request.
Apache cPanel SSL Cert Installation
Installing your cPanel SSL Certificate
The following instructions are for cPanel 11. If you have a different version of cPanel, you will go through a similar process but you may need to ask your web host for specific instructions.
1.Download your Intermediate and Primary Certificate files from your certificate provider to the directory where you will keep your certificate and key files.
2.Login to your cPanel control panel.
3.Find and click on SSL/TLS Manager.
4.Click on Generate, view, upload, or delete SSL certificates.
5.Under the Upload a New Certificate section, click on the Browse button and find your Primary Certificate (yourdomain.crt) that you downloaded in the first step.
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.
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.
Apache module : mod_bandwidth
Bandwidth management module for the Apache webserver
“Mod_bandwidth” is a module for the Apache webserver that enable the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain.
“mod_bandwidth” software is copyright Yann Stettler and CohProg SàRL. It’s distributed “as is” under the Apache Group licence.
Reference: http://www.cohprog.com/v3/bandwidth/doc-en.html