again, i'm new to apache under linux, so this may be elementary...
how exactly do I enable mod_proxy in Apache2? I'm pretty certain I compiled it properly, but I get Invalid command 'RewriteEngine' in the error log from my [previously working on win32 apache] .htaccess file. I am presuming this is because mod_rewrite is not enabled.
I thought [though retrospectively incorrectly] that if I compiled Apache with --enable-MODULE it would automatically enable those modules. Is there something else I need to do?
Here's my
./configure script -- does it look right?./configure -prefix=/usr/local/apache2 \
--enable-module=so \
--enable-module=auth_db \
--enable-module=digest \
--enable-module=example \
--enable-module=log_agent \
--enable-module=mime_magic \
--enable-module=usertrack \
--enable-module=auth_anon \
--enable-module=auth_digest \
--enable-module=cern_meta \
--enable-module=expires \
--enable-module=proxy \
--enable-module=unique_id \
--enable-module=vhost_alias \
--enable-module=auth_dbm \
--enable-module=headers \
--enable-module=info \
--enable-module=log_referer \
--enable-module=mmap_static \
--enable-module=speling \
--enable-module=rewriteThanks so much!
January 7 2005, 07:30:52 UTC 8 years ago
First off, check that mod_proxy is compiled in:
$ apachectl -lCompiled in modules:
core.c
mod_proxy.c
proxy_connect.c
proxy_ftp.c
proxy_http.c
prefork.c
http_core.c
mod_so.c
Also, check what modules you're loading dynamically:
$ grep LoadModule /usr/local/etc/apache2/httpd.confLoadModule access_module libexec/apache2/mod_access.so
[...]
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
[...]
It sounds like you want to use mod_rewrite, but you've either not loaded it, or not allowed the overrides in .htaccess
January 7 2005, 13:02:45 UTC 8 years ago
[vax@localhost bin]# ./apachectl -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.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_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
[vax@localhost bin]# grep LoadModule ../conf/httpd.conf
LoadModule php5_module modules/libphp5.so
[vax@localhost bin]#
but i thought that having
--enable-module=rewritein ./configure would force it to compile.i've certainly got the source files:
/install/httpd-2.0.52/modules/mappers/mo d_rewrite.exp _rewrite.h d_rewrite.c d_rewrite.dspinstall/httpd-2.0.52/modules/mappers/mod
/install/httpd-2.0.52/modules/mappers/mo
/install/httpd-2.0.52/modules/mappers/mo
looking at the install output i captured, i see:
[vax@localhost httpd-2.0.52]# ./configure -prefix=/usr/local/apache2 \
> --enable-module=so \
> --enable-module=auth_db \
> --enable-module=digest \
> --enable-module=example \
> --enable-module=log_agent \
> --enable-module=mime_magic \
> --enable-module=usertrack \
> --enable-module=auth_anon \
> --enable-module=auth_digest \
> --enable-module=cern_meta \
> --enable-module=expires \
> --enable-module=proxy \
> --enable-module=unique_id \
> --enable-module=vhost_alias \
> --enable-module=auth_dbm \
> --enable-module=headers \
> --enable-module=info \
> --enable-module=log_referer \
> --enable-module=mmap_static \
> --enable-module=speling \
> --enable-module=rewrite
checking for chosen layout... Apache
.....
checking whether to enable mod_proxy... no
...
checking whether to enable mod_speling... no
checking whether to enable mod_userdir... yes (default)
checking whether to enable mod_alias... yes (default)
checking whether to enable mod_rewrite... no
checking whether to enable mod_so... yes
so, some of the modules i specified are enabled, some are not... does it compile them and just not enable them?
January 8 2005, 08:11:45 UTC 8 years ago
--enable-proxyrather than--enable-module=proxyJanuary 7 2005, 09:12:06 UTC 8 years ago
Someone else alreayd gave you the commands to see what modules are compiled in and in your config so I won't repeat those, but make sure you have both the proxy *and* the rewrite modules loaded. You might also need proxy_http_module if you are doing any URL rewriting.
January 7 2005, 14:04:55 UTC 8 years ago
i think the problem is that i'm not setting the configure parameters correctly (or i'm failing to include dependencies). i'll look at the proxy_http module and see if its something i need.
but first step's first -- try to get mod_rewrite compiled with apache! (see previous thread for details)
thanks for your help!
January 7 2005, 20:45:31 UTC 8 years ago
LoadModule info_module modules/mod_info.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php5_module modules/libphp5.so
everything else was built in. why it didn't do it with mod_info and mod_rewrite, i have no clue. if anybody knows, i'd love to hear it.
thanks everybody for your help -- your inquiries pointed me in the right direction.
Suspended comment
Suspended comment