# Apache2 and ssl

## gmtl3

I'm trying to use apache2 as a reverse proxy to protect an internal IIS OWA server.  I had it working on another box using apache 1.3

The proxy module is issuing errors about ssl.  Things like:

```

[Fri Feb 20 22:00:43 2004] [debug] proxy_http.c(1064): proxy: HTTPS: declining

 URL https://webmail.domain.org/Exchange/ (mod_ssl not configured?)

[Fri Feb 20 22:00:43 2004] [debug] proxy_connect.c(145): proxy: CONNECT: declining URL https://webmail.domain.org/Exchange/

[Fri Feb 20 22:00:43 2004] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

```

Does apache2 require mod_ssl to serve up ssl?  The apache documentation talks about mod_ssl under the 2.0 documentation, but when I "pretend" emerge mod_ssl, it only wants to install apache 1.3 ... even if apache2 is already installed.  I saw in my emerge log that apache2 was compiled with --enable-ssl=shared.

Here's the statements that I had put in commonapache2.conf (or commonhttpd.conf actuall) for apache 1.3:

```

ProxyPass /exchweb https://webmail.domain.org/exchweb/

ProxyPass /Exchange https://webmail.domain.org/Exchange/

ProxyPass / https://webmail.domain.org/Exchange/

```

Looking for some help.

Thanks,

----------

## RedDawn

If you have the ssl flag in your make.conf then the ssl module for apache should be located in the ( extramodules ) folder..  so try this!

```

LoadModule ssl_module                    extramodules/mod_ssl.so

```

put the line in your 

/etc/apache2/conf/apache2.conf

and it should work!

test it by 

https://127.0.0.1

if it connects then your good to go!

----------

## gmtl3

I figured it out, but forgot to post back here.

I tried adding the LoadModule statement to my apache2.conf file, but that resulted in an error message.

What did work was putting:

```
APACHE2_OPTS="-D SSL"
```

 in /etc/conf.d/apache2.  That loads it from /etc/apache2/conf/modules.d/40_mod_ssl.conf

----------

## KShots

Yet another similar problem... I haven't seen a solution that fits me yet (tried yours, said I had a syntax error when I added SSL to that line).

I have ssl defined in my /etc/make.conf file... and an "emerge --verbose -p apache" produces the following output:

```
root@gorgon rich # emerge -p --verbose apache

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] net-www/apache-2.0.49  +berkdb +gdbm +ldap  0 kB

Total size of downloads: 0 kB
```

Under /etc/conf.d/apache2:

```
APACHE2_OPTS="-D PHP4 SSL"
```

I normally have the PHP4 in there, just tagged SSL to the end... and it claims a syntax error. Any ideas?

EDIT: Oops, it's just a misunderstanding of how that line works. Replaced the space between PHP4 and SSL with a comma, and it works fine now.   :Embarassed: 

----------

