Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am very sorry for this question, but I really am a noob, and searching didn't help
What is the difference between .so and .c mods?

Next, once again my apologies for such an exansive, generic, probably hard-to-pin-down question, and I will greatly appreciate all advice
I have a small VPS (4 x quad core, 3GB RAM, Xen, CentOS 6 64-bit, Apache, cPanel, PHP, mySQL. Scripts: WordPress, OpenCart, bbPress, phpBB, Menalto Gallery). I am trying to get rid of all mods that I don't need / am not using. Please can you help me identify which ones I should remove?

My host says: The loaded Apache Modules are:
Compiled in modules:

core.c
Core Apache HTTP Server features that are always available

Seems pretty clear to me that this is core and so required.

http_core.c
No clue what this is. But I suspect it has to do with the core, so planning to leave this alone.

prefork.c
This Multi-Processing Module (MPM) implements a non-threaded, pre-forking web server that handles requests in a manner similar to Apache 1.3. It is appropriate for sites that need to avoid threading for compatibility with non-thread-safe libraries.

Again, not sure what this mumbo jumbo means. What are threads? What are thread-safe libraries? Which libraries are non-thread-safe?
My previous understanding was that what prefork does is pre-load some of the code so that it doesn't need to be loaded upon requests and so requests can be served quickly.
But now I am confused.
Keep or ditch?

mod_actions.c
This module has two directives. The Action directive lets you run CGI scripts whenever a file of a certain MIME content type is requested. The Script directive lets you run CGI scripts whenever a particular method is used in a request.

Ok, so, I suspect I need this because the scripts do deal with upload, download and management of files including images/media and other types

mod_alias.c
The directives contained in this module allow for manipulation and control of URLs as requests arrive at the server.

Ok, pretty sure I need that.

mod_asis.c
This module provides the handler send-as-is which causes Apache to send the document without adding most of the usual HTTP headers.
This can be used to send any kind of data from the server, including redirects and other special HTTP responses, without requiring a cgi-script or an nph script.

Hmm...not sure...what would be some examples of situations where this is useful/used?

mod_auth_basic.c
mod_authn_default.c
mod_authn_file.c
This module allows the use of HTTP Basic Authentication to restrict access by looking up users in the given providers.

Not quite sure what this means and what this is used for. If I disable this, will my scripts not be able to handle login/logout functionality? Which specific authentication does this refer to?

mod_authz_default.c
mod_authz_groupfile.c
mod_authz_host.c
mod_authz_user.c
The directives provided by mod_authz_host are used in <Directory>, <Files>, and <Location> sections as well as .htaccess files to control access to particular parts of the server.

Ok, I know I need mod_authz_host. But I have only one user on my VPS. Do I need authz_default, authz_user and authz_groupfile?

mod_autoindex.c
Generates directory indexes, automatically, similar to the Unix ls command or the Win32 dir shell command

Ok, so, required.

mod_cache.c
Content cache keyed to URIs

I suspect this has been enabled by mod_pagespeed so I will leave this alone.

mod_cgi.c
Any file that has the handler cgi-script will be treated as a CGI script, and run by the server, with its output being returned to the client.

I suspect this is pretty much required.

mod_deflate.c
Compress content before it is delivered to the client
Yup, need it.

mod_dir.c
Provides for "trailing slash" redirects and serving directory index files

I imagine this is needed too.

mod_expires.c
Generation of Expires and Cache-Control HTTP headers according to user-specified criteria

Yup, I need this.

mod_filter.c
This module enables smart, context-sensitive configuration of output content filters. For example, apache can be configured to process different content-types through different filters, even when the content-type is not known in advance (e.g. in a proxy).

Say what?

mod_imagemap.c
This module processes .map files, thereby replacing the functionality of the imagemap CGI program.

Still don't get it. In which situations would this be needed?

mod_include.c
This module provides a filter which will process files before they are sent to the client. The processing is controlled by specially formatted SGML comments, referred to as elements. These elements allow conditional text, the inclusion of other files or programs, as well as the setting and printing of environment variables.

Sounds like something that is probably required.

mod_info.c
Provides a comprehensive overview of the server configuration

Not sure if I need this. Wouldn't I have server config info available in my cPanel anyway?

mod_log_config.c
This module provides for flexible logging of client requests. Logs are written in a customizable format, and may be written directly to a file, or to an external program.

Sounds like something important. Thinking of leaving it alone.

mod_logio.c
This module provides the logging of input and output number of bytes received/sent per request.

Sounds like something that would take up immense amounts of storage. Do I need it?

mod_mem_cache.c
Content cache keyed to URIs

Once again suspected work of mod_pagespeed. Leaving it alone.

mod_mime.c
mod_mime_magic.c
Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)

Sounds very important. Leaving it alone.

mod_negotiation.c
Content negotiation, or more accurately content selection, is the selection of the document that best matches the clients capabilities, from one of several available documents.

Sounds important. Leaving it alone.

mod_proxy.c
mod_proxy_ajp.c
mod_proxy_balancer.c
mod_proxy_connect.c
mod_proxy_ftp.c
mod_proxy_http.c
mod_proxy_scgi.c
HTTP/1.1 proxy/gateway server

I have a website with domain1.com I also have another domain2.com mapped to it. Then there are subdomains e.g. de.domain3.com and fr.domain3.com also as add-on domain. Do I need these proxy mods? Do they have ANYTHING to do with domains? What are they used for?

mod_rewrite.c
Provides a rule-based rewriting engine to rewrite requested URLs on the fly

WordPress, OpenCart and Menalto all use "pretty URLs" so this is a must.

mod_setenvif.c
The mod_setenvif module allows you to set internal environment variables according to whether different aspects of the request match regular expressions you specify.

Sounds like something that would be required.

mod_so.c
Loading of executable code and modules into the server at start-up or restart time

This is probably required for the whole module system to work.

mod_ssl.c
Strong cryptography using the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols

Do I need this? Am I even using SSL?

mod_status.c
The Status module allows a server administrator to find out how well their server is performing. A HTML page is presented that gives the current server statistics in an easily readable form.

How dispensable is this? Are there other ways to get the same information?

mod_suexec.c
Allows CGI scripts to run as a specified user and Group

I guess I need this as my PHP handler is suPHP

mod_unique_id.c
Provides an environment variable with a unique identifier for each request

What are the conditions where this would be important/useful?

mod_userdir.c
his module allows user-specific directories to be accessed using the http://example.com/~user/ syntax.

I guess I don't need this.

I would greatly appreciate any guidance. Thank you.

share|improve this question

closed as not a real question by Michael Hampton, Jay, Skyhawk, Mark Henderson Oct 28 '12 at 20:35

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
It is probably a good idea to just leave this stuff alone if you don't know what you are doing. Usually, the defaults are pretty sane and, as the saying goes, if it ain't broke, don't fix it. –  SvW Oct 28 '12 at 17:24
    
@SvenW It is kinda broke. Using too much RAM. Where can I read from a beginner's perspective what all this stuff means? All references I have found seem to assume pretty advanced knowledge. –  OC2PS Oct 28 '12 at 17:27
    
You have asked many different questions here. Are you experiencing a performance issue due to excessive RAM utilization under a certain load condition? Without a specific problem, it is hard to imagine someone recommending a solution, let alone reviewing your Apache configuration in detail. –  Skyhawk Oct 28 '12 at 17:38
    
Your best bet is to probably read the Apache docs to work out which modules you need. Honestly though, it's far more likely that excessive RAM usage is down to the-PHP-you're-running than your Apache modules. –  nickgrim Oct 28 '12 at 18:34
    
There's over 20 individual questions here, and I'm afraid we're not going to be able to go through and answer them all. If you have a specific question about one of them, feel free to ask another question outlining what you've found out about it and what you don't understand. –  Mark Henderson Oct 28 '12 at 20:34

1 Answer 1

up vote 4 down vote accepted

I am not sure I would call that a small VPS, but whatever ;).

How experienced are you with Linux? I think you could probably switch web servers to nginx and save a large amount of resources.

As for the modules: Leave the auth ones alone. I know that auth basic is the module used when you Password Protect Directories in cPanel/WHM. The others mostly look important. I myself would leave the others in, to avoid breaking any functionality.

I would just assume that what cPanel compiled in is probably needed somewhere; be it in your site or for the cPanel/WHM UI.

share|improve this answer
    
Not very experienced with Linux. In fact, not at all. I used DRS Unix in 1995-1997 but did not perform any sysadmin tasks. Can I use Varnish on Apache & cPanel? –  OC2PS Oct 30 '12 at 6:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.