You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Moktar KONE <mo...@mtds.com> on 2003/10/08 17:30:16 UTC

[users@httpd] mod_rewrite

Hi all, 
I am trying to enable mod_rewrite but get these error message:

Syntax error on line 204 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

Syntax error on line 463 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not included in the server configuration


I am using apache 1.3.28

what wrong with my config? I have compiled apache with mod rewrite.

Re: [users@httpd] mod_rewrite

Posted by Moktar KONE <mo...@mtds.com>.
> Plain text, please.  :-)
>
> Without seeing the httpd.conf, I'm not sure, but I might guess from the
> error messages that you're trying to use a mod_rewrite directive before
you
> load the mod_rewrite module.
>
> How have you built mod_rewrite?  What was the ./configure line?  As a DSO,
> or a static module, or static into Apache?  If the last, does httpd -l
show
> it?  If one of the first two options, is there a mod_rewrite.so file after
> compiling?  Is it copied to the right directory after make install?  Have
> you got the LoadModule and AddModule lines in the right place, with the
> right paths, spelled correctly, and uncommented?  Can you show the
portions
> of the file where "apachectl configtest" is reporting the syntax errors?
>
> Leif

ok, I compiled apache like this:

#
ix=/etc/httpd/conf/                   --enable-module=rewrite               
    --enable-shared=rewrite
# make
# make install
this is the result of config test:
# apachectl configtest
Syntax OK

but when a launch apache I had this error :

Syntax error on line 205 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not
included in the server configuration

this is a part of my httpd file that I get after compilation:

# LoadModule foo_module libexec/mod_foo.so
LoadModule rewrite_module     libexec/mod_rewrite.so

#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration







>
> ----- Original Message -----
> From: Moktar KONE
> To: users@httpd.apache.org
> Sent: Wednesday, October 08, 2003 11:30 AM
> Subject: [users@httpd] mod_rewrite
>
>
> Hi all,
> I am trying to enable mod_rewrite but get these error message:
>
> Syntax error on line 204 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a
module
> not included in the server configuration
>
> Syntax error on line 463 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'LoadModule', perhaps mis-spelled or defined by a module
not
> included in the server configuration
>
>
> I am using apache 1.3.28
>
> what wrong with my config? I have compiled apache with mod rewrite.
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite

Posted by Leif W <wa...@usa.net>.
Plain text, please.  :-)

Without seeing the httpd.conf, I'm not sure, but I might guess from the
error messages that you're trying to use a mod_rewrite directive before you
load the mod_rewrite module.

How have you built mod_rewrite?  What was the ./configure line?  As a DSO,
or a static module, or static into Apache?  If the last, does httpd -l show
it?  If one of the first two options, is there a mod_rewrite.so file after
compiling?  Is it copied to the right directory after make install?  Have
you got the LoadModule and AddModule lines in the right place, with the
right paths, spelled correctly, and uncommented?  Can you show the portions
of the file where "apachectl configtest" is reporting the syntax errors?

Leif

----- Original Message ----- 
From: Moktar KONE
To: users@httpd.apache.org
Sent: Wednesday, October 08, 2003 11:30 AM
Subject: [users@httpd] mod_rewrite


Hi all,
I am trying to enable mod_rewrite but get these error message:

Syntax error on line 204 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module
not included in the server configuration

Syntax error on line 463 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not
included in the server configuration


I am using apache 1.3.28

what wrong with my config? I have compiled apache with mod rewrite.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite

Posted by Moktar KONE <mo...@mtds.com>.
ok, I compiled apache like this:

#
ix=/etc/httpd/conf/                   --enable-module=rewrite               
    --enable-shared=rewrite
# make
# make install
this is the result of config test:
# apachectl configtest
Syntax OK

but when a launch apache I had this error :

Syntax error on line 205 of /etc/httpd/conf/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not
included in the server configuration

this is a part of my httpd file that I get after compilation:

# LoadModule foo_module libexec/mod_foo.so
LoadModule rewrite_module     libexec/mod_rewrite.so

#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_so.c
AddModule mod_setenvif.c

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration



From: "Jonas Eckerman" <jo...@frukt.org>
To: <us...@httpd.apache.org>
Sent: Wednesday, October 08, 2003 10:22 PM
Subject: Re: [users@httpd] mod_rewrite


On Wed, 8 Oct 2003 15:30:16 -0000, Moktar KONE wrote:

> Syntax error on line 204 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'RewriteEngine', perhaps mis-spelled or defined by

Are you putting "RewriteEngine on" before the actual loading of
mod_rewrite in the config?

> Syntax error on line 463 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'LoadModule', perhaps mis-spelled or defined by a

Did you compile Apache with mod_so to get support for loadable
modules?

Without support for loadable modules, you won't be able to load
loadable modules.

Is the LoadModule command on line 463 supposed to load mod_rewrite?
If it, and if you compiled mod_rewrite as a module, you should not be
surprised that you can't use the module. It's hard to get Apache to
use a module it hasn't loaded.

> what wrong with my config? I have compiled apache with mod rewrite.

Well... What does the relevant parts of your config look like?

How did you compile Apache and mod_rewrite?

Regards
/Jonas

--
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] mod_rewrite

Posted by Jonas Eckerman <jo...@frukt.org>.
On Wed, 8 Oct 2003 15:30:16 -0000, Moktar KONE wrote:

> Syntax error on line 204 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'RewriteEngine', perhaps mis-spelled or defined by

Are you putting "RewriteEngine on" before the actual loading of 
mod_rewrite in the config?

> Syntax error on line 463 of /etc/httpd/conf/conf/httpd.conf:
> Invalid command 'LoadModule', perhaps mis-spelled or defined by a 

Did you compile Apache with mod_so to get support for loadable 
modules?

Without support for loadable modules, you won't be able to load 
loadable modules.

Is the LoadModule command on line 463 supposed to load mod_rewrite? 
If it, and if you compiled mod_rewrite as a module, you should not be 
surprised that you can't use the module. It's hard to get Apache to 
use a module it hasn't loaded.

> what wrong with my config? I have compiled apache with mod rewrite.

Well... What does the relevant parts of your config look like?

How did you compile Apache and mod_rewrite?

Regards
/Jonas

-- 
Jonas Eckerman, jonas_lists@frukt.org
http://www.fsdb.org/



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org