Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] [OT] Creating user-friendly URLS with mod_rewrite/Apache



Godwin Stewart wrote:
> On Sun, 20 Aug 2006 01:32:40 +0900, Dave M G <martin@example.com>
> wrote:
> 
>> Do I have to do something in my httpd.conf file like:
>> LoadModule mod_rewrite.so /usr/lib/apache2/modules/mod_rewrite.so
> 

Hello,

On Debian based distros with Apache2 you do not need to edit your
httpd.conf file to enable a module.

Under the /etc/apache2 directory you will find a "mods-available" and
"mods-enabled" directories.

mods-available lists all of the modules available but not necessarily
enabled.
mods-enabled contains symlinks to modules in the mods-available directory.

AFAIK the a2enmod command creates a symlink within the mods-enabled
directory to the relevant files in the
mods-available directory and restarts apache.

So, if you do an "ls -l /etc/apache2/mods-enabled" you should see a list
of all modules enabled. e.g. The following show that the ssl conf and
load files are symlinked:

ssl.conf -> ../mods-available/ssl.conf
ssl.load -> ../mods-available/ssl.load

If you apt-get install an apache2 module it will create new files in the
mods-available directory. However, the modules will not be enabled until
you specifically enable them.

As for the "apache2 -l" command according to the man page this will list
modules that are "compiled" into the server. I assume this is why
mod-rewrite is not showing up as it is "loaded" in and not "compiled" in.

Regards, Keith


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links