Archive for the tag 'Apache'

How to check Apache Modules Switched Off in VPS-Optimized Mode

The list of the modules can vary depending on the operating system distribution and architecture. When Parallels Plesk Panel is installed and the optimized mode is switched on, you can check the list in the following files:

* On 32-bit operating systems -

/usr/lib/plesk-9.0/vps_optimized_aspects/apache-modules-all

* On 64-bit operating systems -

/usr/lib64/plesk-9.0/vps_optimized_aspects/apache-modules-all

How to list all the loaded modules in apache

We can use the following command to list all the loaded modules in apache (both DSO and Static)

This example is from a debian box using apache2.

host ~: apache2ctl -t -D DUMP_MODULES

Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
setenvif_module (shared)
status_module (shared)
Syntax OK

SBDavid

How to Disable IPv6 in Apache Server

How to Disable IPv6 in Apache Server

If there is no reason to run Apache with IPv6 then disabling it is wasy. We need to make quick changes to the Listen directive.

By default, Apache will listen on all IPs, both IPv6 and IPv4. (Assuming your system has IPv6 support). This is controlled by the Listen directive:

Listen 80

Turn off IPv6 in Apache

To turn off IPv6 in Apache, just change the Listen directive to:

Listen 0.0.0.0:80

This will limit Apache to listening only to IPv4 connections. We can repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.

SBDavid

Optimizing Apache

Optimizing Apache

Apache can be tweaked by changing a few of its settings to make it work faster with respect to the capability your server possess.

Some of the values that can be tweaked in the ‘Global’ section of Apache configuration file (found at /usr/local/apache/conf/httpd.conf) are explained below:

Timeout

This directive sets the maximum amount of time the server will allow a connection to remain open. The default value of 1200 (20 minutes) is appropriate for most instances.

KeepAlive

With this directive set to on, the server will attempt to record the userid of each query to the server. Keep this directive set to off unless you are willing to devote a significant amount of network bandwidth to this function.

MaxSpareServers and MinSpareServers

Apache has several statements to configure the number of clients being handled and the number of child-processes it forks off to deal with those requests. If the machine running the Apache installation is not intended for anything but running Apache, it is generally a good idea to make these numbers as high as possible, but not so high that the machine starts paging memory out to its swap space.

MaxRequestsPerChild

The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child process can handle during its lifetime. After MaxRequestsPerChild requests, the child process will die. If MaxRequestsPerChild is zero, the process will live until the server kills it (because it is no longer needed, which will depend on the value of MinSpareServers and the number of current requests) or until the server itself is stopped.

Apache Memory Usage Restrictions in WHM

Main >> Service Configuration >> Apache Configuration

This function will calculate your apache memory usage based on your memory usage history and set a new memory limit for Apache processes. Limiting each process’ access to memory will increase the stability of your server but may reduce performance slightly. This is a limit for each Apache process, not for all Apache processes combined.

Click the Proceed button to activate this feature

For more information about this feature, see http://httpd.apache.org/docs/2.0/mod/core.html#rlimitmem

This will add a line to httpd.conf

#Rlimit added by apachelimits.pl
RLimitMEM 148015786

« Prev - Next »