# SSL Encryption with apache proxy

## tuner23

Hy,

i want to setup ssl encryption for my apache proxy, so that i don't have to encrypt every site.

I tried out the following, but that does not work:

```

<VirtualHost *:80>

    ServerName  wiki.tunes.dyndns.org

    RewriteEngine On

    RewriteCond %{HTTPS} !=on

    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

</VirtualHost>

<VirtualHost *:443>

    ServerName  wiki.tunes.dyndns.org

    SSLEngine on

    SSLCertificateFile /etc/apache2/ssl/arx.crt

    SSLCertificateKeyFile /etc/apache2/ssl/arx.key

    ProxyPreserveHost On

    ProxyPass / http://wiki.arx/

    ProxyPassReverse / http://wiki.arx/

</VirtualHost>

```

Is it possible to set this up, the way that the connection ist encrypted from the client to the proxy?

How can i manage this?

Thanks in advance,

Antonis.

----------

