206
Chapter 14. Apache HTTP Server
A sample
LoadModule
line looks like this:
LoadModule access_module modules/mod_access.so
If you add or delete modules from
http.conf
, you must reload or restart Apache, as covered in
Section 14.4.
If you have your own module, you can add it to the
httpd.conf
file so that it is compiled in and
loaded as a DSO. For this you need have the
httpd devel
package installed because it contains the
include files, the header files, and the APache eXtenSion (
apxs
) application. The
apxs
command uses
the include files and the header files to compile Apaches modules.
If you have written your own module or are using a third party module, you should be able to use
apxs
to compile your module sources outside the Apache source tree, without needing to tweak any
compiler or linker flags. If you need more information on
apxs
, please see the Apache documentation
at http://httpd.apache.org/docs 2.0/dso.html and the
apxs
, man page.
Once you have compiled the module, put your module in the
/usr/lib/httpd/
directory. Then add
a
LoadModule
line to
httpd.conf
. After the
LoadModule
list in
httpd.conf
, add a line for the
shared object file for your module like the following:
LoadModule
foo_module
modules/ mod_foo.so
Note that you will need to change the name of
foo_module
and
mod_foo.so
as appro 
priate.
Once you have completed these steps, stop and start your Web server as outlined in Section 14.4. If
you have done everything correctly and your module is correctly coded, the Web server should find
your module and load it.
14.8. Using Virtual Hosts
You can use the Apache HTTP Server's virtual hosts capability to run different servers for different
IP addresses, different host names, or different ports on the same server. If you are interested in using
virtual hosts, complete information is provided in the Apache documentation on your machine or on
the Web at http://httpd.apache.org/docs 2.0/vhosts/.
Note
You cannot use name based virtual hosts with your Red Hat Linux Advanced Server, because the
SSL handshake occurs before the HTTP request which identifies the appropriate name based virtual
host. If you want to use name based virtual hosts, they will only work with your non secure Web
server.
Virtual hosts are configured within the
httpd.conf
file, as described in Section 14.5. Please review
that section before you start to change the virtual hosts configuration on your machine.
14.8.1. The Secure Web Server Virtual Host
The default configuration of your Web server runs a non secure and a secure server. Both servers use
the same IP address and host name, but they listen on different ports, and the secure server is a virtual
host configured. This configuration enables you to serve both secure and non secure documents in an
manner. Setting up the secure HTTP transmission is very resource intensive, so generally you will be
able to serve far fewer pages per second with a secure server. You need to consider this when you
decide what information to include on the secure server and the non secure server.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved