Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 839
  • Last Modified:

How to load a module ??

How to load the module (mod_speling) in Linux Red Hat 6.1 using the Apache webserver and make sure that this module is active ??

Note: the server is away .. using Webmin software ..
1 Solution
from the command line.. never used the Webmin software you refered to.

in your /etc/httpd/conf/httpd.conf file, uncomment the LoadModule line for the speling_module and uncomment the AddModule line for mod_speling.c

then, type /etc/rc.d/init.d/httpd restart

mod_speling should be enabled at this point.

mhakimAuthor Commented:
Need some clarification .. !!!
I was trying to find the file httpd.conf tell i found it in the:


when i open i could not even now what to do to add this mod. !!!
I do not use Linux before and the sytem is far away !!! I do not now how to use a Telent i do ues Windows Commander (FTP) i can download the files then edit it ...etc
Unfortunately, you are going to have to gain some level of Linux proficiency if you want to adminsiter an Apache server running on Linux.  You need to know the basics of editing files, copying files, starting daemons, etc...

munsie's answer is essentially correct.  Usually the httpd.conf file is in /etc/httpd/conf.  However, if someone manually installed Apache ie didn't use an rpm), then the config files could be in /usr/local/apache/conf/ (which is a directory, which  is probably why you couldn't edit it).

You still need to edit the httpd.conf file and add a LoadModule line for mod_speling.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

To do telnet from a doze box, open a dos prompt, then type 'telnet <machine address>' w/o quotes and with proper data values. I would recommend you use vi over the line (no flames on this please) to edit the file. [Learn to use vi first, or sit down with a vi tutorial in hand].
Using Webmin you may be able to load the Module by accessing the Server > click on Apache Webserver > Re-Configure Known Modules > pick the module out of the list that you wish to apply > stop and restart Apache.
mhakimAuthor Commented:
Thanks All ..

I am using a Webmin version 0.78 i have take all the setps you told my .. then when i select the (mod_speling) module in the Re-Configure area i only see one button it is (Configure) when i press it (after i select the mod_speling) it take me to the Apache Webserver on the upper right i can see to links (Apply Changes) & (Stop Apache) .. first i click on the (stop Apahce) then nothing happen .. after i have made all the steps again i cick on (aply changes) then it gave me ERROR Failed to apply changes : sh: /usr/local/apache/bin/: is a directory !!
About the answer of Mr. munsie's i was trying to add a comment !! but by mistake i press the Reject links (i am new to this site!!) but i have wrote to him ..(Need some clarification .. !!!) i did not mean to make his answer uncorrect !!! also i have found this HTTPD.CONF files after serching very hard (becuase the server is in another country) & the FTP link is to slow !!
For that i like Mr. munsie or anyone how like to help to answer .. if Mr. munsie cant not answer (becuase of the reject option) just tell me so that i delete this question & ask it again.
About me info in text editing files are very good .. (studying for the MCSE2000) but New to LINUX !!!
about Telenet i have learn how to use it in the Webmin software .. even how to open the File HTTPD.CONF & to save to it.
Only i need to know what should i type in this file !!!! (all things i need to type) becuase i did not find any (LoadModule Line).
& to Mr. sawdoc if you have any idea how to make this Wemmin (ver 0.78) load the Module even with using the Telent in the (Webmin) Just tell me !!!

Thanks every one for your comments ..
okay, quick steps:

1) telnet into your linux box as root.  The prompts are pretty easy, just enter root and your password.

you can use windows telnet, type telnet into the run dialog

2) type:
      cd /usr/local/apache/confg

note the slashes are forward, not backwards

3) type:
      pico httpd.conf

at this point you are in the pico text editor with the httpd.conf file

4) type ctrl-w, and enter speling_module

you should be at a line that looks like this:

# LoadModule speling_module

remove the # on the line... it's a normal text editor, so nothing fancy is needed.

5) type ctrl-w again, and enter mod_speling.c

you should be at a line that looks like this:

# AddModule mod_speling.c

again, remove the #

6) type ctrl-x, answer y to save, and hit enter to accept the filename

at this point, you are back at a command line prompt

7) restart the apache webserver

depending on how it was installed, you may have to run apachectl or /etc/rc.d/init.d/httpd to restart the server.

if it's apachectl, it's probally in /usr/local/apache/bin

if it's the httpd script, it's in /etc/rc.d/init.d

either way, cd into one of those directories (on your machine it's probally the apachectl script), and run it....

you may have to run it like this:

     ./apachectl restart

     -- OR --

     ./httpd restart

or, since you have webmin, you can probally restart the server from there.

at this point, you should be running mod_speling.  exit out of the connection, and close the telnet session.

Some problems you may have:

 * can't telnet in as root
this is a security issue in RedHat.  I don't recommend trying to make it so root can telnet in, just login as another user, and then type 'su -' and enter root's password at the prompt.

 * pico is not installed
not too likely, but it sometimes happens... in this case, you'll need to use vi.  I'm not very good in vi, but here are some basics:

   instead of ctrl-w to search as in pico, type '/mod_speling'... to search again, just type '/'

   to delete a character, type 'x'

   to save and exit, type ':wq'

   if you start typing like you do in a normal editor, you'll most likely mess something up severly.  just stick to the above keypresses and you'll be okay.

btw, i believe you can choose a comment as the answer... i've haven't asked very many questions, so i can't tell you for sure.  I would've given this as a answer, but the question is currently locked.

good luck,
mhakimAuthor Commented:
Thanks Mr Dennis,

About all the steps it worked fine ..
but about the search for:

# LoadModule speling_module
# AddModule mod_speling.c

Where should i add these files !!!
I have the (LoadModule) under the #Dynamic Shared Object (DSO) Support
Under section One (Global Environment).
& note there is no (AddModule) at all!!!

They are not in the file !!!
About restarting the apache it is easy.

Thanks again,

Note: But how can i give you points !!!
the AddModule line should be in one of the files in your conf directory... you can type the following at the prompt while your in your /usr/local/apache/conf directory:

grep speling *

you should get back the name of the file and the line with them in it... from their, just use pico to edit the file, search for the line and change it

if you don't have the AddModule or LoadModule lines, grep for AddModule and add the line from above (without the '#') at the end of the list.  Do the same for the LoadModule line.

then restart the server

as a small correction, the LoadModule line should be as the following:
LoadModule speling_module  libexec/mod_speling.so

but, that shouldn't matter too much because the the LoadModule line should already be in your httpd.conf file.

about the points, i believe you should be able to choose my comment as an answer... but you may have to reject any proposed answers first.. that is, if those answers weren't helpful to you

good luck,
mhakimAuthor Commented:
Hello again ..

I have typed in the httpd.conf files (using telnet):

LoadModule speling_module  libexec/mod_speling.so
AddModule mod_speling.c

I put (Add mod) after (Load mod) becuase AddModule (does not appear in nay conf files)
when i have press Ctrl + x & Y to save the file i have this message:

Cannot open file for writing: Permission denied

What should i do to save these changes can i move the protection of this file.

Thanks ..


AddModule has to be in one of your config files, but I believe (not a 100% sure) that placing it anywhere after the LoadModule will work.

As far as permission denied, are you logged in as root?  If you had to telnet in as someone else, you'll need to type to following at the prompt:
      su -

then enter the root password.  at this point, you should be able to edit and save the file.

if you're not sure who you are logged in as, type 'whoami' at the prompt

good luck,
mhakimAuthor Commented:

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now