Apache Server configuration support - Trouble enabling mod_rewrite on Apache 2.2.

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > October 2006 > Trouble enabling mod_rewrite on Apache 2.2.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Trouble enabling mod_rewrite on Apache 2.2.
laredotornado@zipmail.com

2006-10-26, 7:20 pm

Hi, I recently downloaded and installed Apache 2.2.3 on my Fedora Core
5 Linux x86 machine. I want to build in mod_rewrite support, but have
failed to build it in. I try this configure command ...

../configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-ssl
--with-ssl=/usr --enable-setenvif --enable-module=most
--enable-module=rewrite --enable-shared=max

and then did "make" and "make install". Sadly, the module still isn't
there are the list reveals (please see below). What is wrong with my
configure command?

Thanks, - Dave

[root@localhost bin]# ./httpd -l
Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c

Jim Hayter

2006-10-26, 7:20 pm

laredotornado@zipmail.com wrote:
> Hi, I recently downloaded and installed Apache 2.2.3 on my Fedora Core
> 5 Linux x86 machine. I want to build in mod_rewrite support, but have
> failed to build it in. I try this configure command ...
>
> ../configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-ssl
> --with-ssl=/usr --enable-setenvif --enable-module=most
> --enable-module=rewrite --enable-shared=max
>
> and then did "make" and "make install". Sadly, the module still isn't
> there are the list reveals (please see below). What is wrong with my
> configure command?
>
> Thanks, - Dave
>
> [root@localhost bin]# ./httpd -l
> Compiled in modules:
> core.c
> mod_authn_file.c
> mod_authn_default.c
> mod_authz_host.c
> mod_authz_groupfile.c
> mod_authz_user.c
> mod_authz_default.c
> mod_auth_basic.c
> mod_include.c
> mod_filter.c
> mod_log_config.c
> mod_env.c
> mod_setenvif.c
> mod_ssl.c
> prefork.c
> http_core.c
> mod_mime.c
> mod_status.c
> mod_autoindex.c
> mod_asis.c
> mod_cgi.c
> mod_negotiation.c
> mod_dir.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_so.c
>


../httpd -l shows only compiled in modules

use ./httpd -M to show all available modules (including those built as
shared).

HTH,
Jim
HansH

2006-10-26, 7:20 pm

<laredotornado@zipmail.com> schreef in bericht
news:1161892892.721980.165080@i42g2000cwa.googlegroups.com...
> Hi, I recently downloaded and installed Apache 2.2.3 on my Fedora Core
> 5 Linux x86 machine. I want to build in mod_rewrite support, but have
> failed to build it in. I try this configure command ...
>
> ./configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-ssl
> --with-ssl=/usr --enable-setenvif --enable-module=most
> --enable-module=rewrite --enable-shared=max

What is paramvalue rewrite telling in context to mod_rewrite ...
.... try --enable-rewrite
and perhaps --enable-max=shared thereafter

http://httpd.apache.org/docs/2.2/pr.../configure.html


HansH


laredotornado@zipmail.com

2006-10-27, 1:25 am

Thanks. That worked in as far as now mod_rewrite is built in as a
static module. (I verified using ./httpd -M). However, it is still
not kicking in. I created a directory with two files -- alice.html and
bob.html and had this .htaccess file

RewriteEngine on
RewriteRule ^alice.html$ bob.html

However, visiting the URL

http://myhost.mydomain.com/temp/alice.html

yields Alice's page instead of Bob's page. Is there anything I need to
put in the httpd.conf file?

Thanks, - Dave



ps Here is the result of ./httpd -M

Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
php4_module (shared)
jk_module (shared)


HansH wrote:
> <laredotornado@zipmail.com> schreef in bericht
> news:1161892892.721980.165080@i42g2000cwa.googlegroups.com...
> What is paramvalue rewrite telling in context to mod_rewrite ...
> ... try --enable-rewrite
> and perhaps --enable-max=shared thereafter
>
> http://httpd.apache.org/docs/2.2/pr.../configure.html
>
>
> HansH


HansH

2006-10-27, 1:17 pm

<laredotornado@zipmail.com> schreef in bericht
news:1161915478.707558.87950@i3g2000cwc.googlegroups.com...
> However, it is still not kicking in.
> I created a directory with two files -- alice.html and bob.html
> and had this .htaccess file
>
> RewriteEngine on
> RewriteRule ^alice.html$ bob.html
>
> However, visiting the URL
> http://myhost.mydomain.com/temp/alice.html
> yields Alice's page instead of Bob's page.
>
> Is there anything I need to put in the httpd.conf file?

Most probably: allowoverride and at least one parameter
http://httpd.apache.org/docs/2.0/mo...l#allowoverride

Further using RewriteLog and RewriteLogLevel will give you some insight on
why rewriterules do not work as expected
http://httpd.apache.org/docs/2.0/mo...html#rewritelog

Note: allowing .htaccess may reduce your servers performance
http://httpd.apache.org/docs/2.0/ho...ccess.html#when

> Loaded Modules:

[snip]
> rewrite_module (static)
> so_module (static)
> php4_module (shared)
> jk_module (share)

Do try to make php4 and jk static too ... and tell me how to


HansH


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com