# mod_proxy missing from Apache [Solved]

## NotExcessive

I'm trying to get mod_proxy going in Apache 2.2.29-r1. I've added the following to httpd.conf:

```
<IfDefine PROXY>

LoadModule proxy_module modules/mod_proxy.so

</IfDefine>

<IfDefine PROXY>

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

</IfDefine>

```

In /etc/conf.d/apache2 I have

```
APACHE2_OPTS="-D PROXY -D JK -D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST"

```

and in /etc/apache2/vhosts.d/00_default_vhost.conf I have:

```
<VirtualHost *:80>

        ServerName localhost

        Include /etc/apache2/vhosts.d/default_vhost.include

        <IfModule mpm_peruser_module>

                ServerEnvironment apache apache

        </IfModule>

        ProxyPass / ajp://localhost:8009/       

        ProxyPassReverse / ajp://localhost:8009/

</VirtualHost>

</IfDefine>

```

Yet firing up Apache gives the error

```
* Apache2 has detected a syntax error in your configuration files:

apache2: Syntax error on line 131 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_proxy.so into server: /usr/lib/apache2/modules/mod_proxy.so: cannot open shared object file: No such file or directory

```

Looking for anything mod_proxy'ish, all I can find on the system is:

```
amarok apache2 # slocate mod_proxy

/etc/apache2/modules.d/27_mod_proxy_html.conf

/var/db/pkg/www-apache/mod_proxy_html-3.0.0

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/PF

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/USE

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/EAPI

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/HOMEPAGE

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/SLOT

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CONTENTS

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/LDFLAGS

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CATEGORY

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CHOST

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/NEEDED

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/LICENSE

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/DESCRIPTION

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/FEATURES

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/SRC_URI

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/repository

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/INHERITED

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CXXFLAGS

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/KEYWORDS

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/environment.bz2

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/PDEPEND

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/mod_proxy_html-3.0.0.ebuild

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/COUNTER

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/RDEPEND

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CBUILD

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/CFLAGS

/var/db/pkg/www-apache/mod_proxy_html-3.0.0/DEPEND

/var/cache/edb/dep/usr/portage/www-apache/mod_proxy_html-3.0.1_pre20071125

/var/cache/edb/dep/usr/portage/www-apache/mod_proxy_html-3.0.0

/usr/lib/apache2/modules/mod_proxy_html.so

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_balancer.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_connect.html.ja.utf8

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy.html.ja.utf8

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_ftp.html

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_http.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_http.html

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_ajp.html.ja.utf8

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_ajp.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_balancer.html

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_ftp.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_connect.html.en

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_ajp.html

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy.html

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_balancer.html.ja.utf8

/usr/share/doc/apache-2.2.9-r1/manual/mod/mod_proxy_connect.html

/usr/libexec/webmin/apache/mod_proxy_balancer.pl

/usr/libexec/webmin/apache/mod_proxy.pl

/usr/include/apache2/mod_proxy.h

/usr/portage/metadata/cache/www-apache/mod_proxy_html-3.0.1_pre20071125

/usr/portage/metadata/cache/www-apache/mod_proxy_html-3.0.0

/usr/portage/distfiles/mod_proxy_html-3.0.0.c.bz2

/usr/portage/www-apache/mod_proxy_html

/usr/portage/www-apache/mod_proxy_html/mod_proxy_html-3.0.1_pre20071125.ebuild

/usr/portage/www-apache/mod_proxy_html/Manifest

/usr/portage/www-apache/mod_proxy_html/files

/usr/portage/www-apache/mod_proxy_html/files/27_mod_proxy_html.conf

/usr/portage/www-apache/mod_proxy_html/mod_proxy_html-3.0.0.ebuild

/usr/portage/www-apache/mod_proxy_html/ChangeLog

/usr/portage/www-apache/mod_proxy_html/metadata.xml

/usr/portage/net-im/ejabberd/files/2.0.0-ejab-542-mod_proxy65.patch

```

So there's no evidence of any mod_proxy libraries. I thought mod_proxy was an integral part of Apache, and it was emerged via portage.

Can anybody fill me in on what I've missed please?Last edited by NotExcessive on Sat Sep 27, 2008 10:03 am; edited 1 time in total

----------

## xces

Check your USE flags for www-servers/apache.

```
$ euses proxy

proxy - HTTP/1.1 proxy/gateway server

proxy_ajp - AJP support module for mod_proxy

proxy_balancer - mod_proxy extension for load balancing

proxy_connect - mod_proxy extension for CONNECT request handling

proxy_ftp - FTP support module for mod_proxy

proxy_http - HTTP support module for mod_proxy
```

----------

## NotExcessive

Yes proxy and proxy_ajp were missing.

----------

