try something like this, a very simple sh script:
#!/bin/sh
PASS1=somepass1
PASS2=somepass2
case $1 in
www.pass1.com:443) echo $PASS1;;
www.pass2.com:443) echo $PASS2;;
esac
exit 0
without the exec, you'll see that apache requests a passphrase via stdin. the
exec basically redirects the stdout from the script it runs at start.
hope that helps.
-sang
On Tue, 5 Mar 2002, Price, Gary wrote:
> You will need a separate pass phrase and script placed in each virtual host
> container.
>
> Gary
>
> -----Original Message-----
> From: Bruno Georges [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 10:57 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: SSLPassPhraseDialog and VirtualHost
>
>
> Hi
> I have a problem when trying to use the SSLPassPhraseDialog directive
> with "exec"
> It works ok with 1 virtual host / 1 password , but not with 2 or more
> The pp.out file just echo the password.
>
> Local httpd.conf shows:
> ----------------------------
> <IfModule mod_ssl.c>
> # Pass Phrase Dialog:
> # #SSLPassPhraseDialog builtin
> SSLPassPhraseDialog exec:/content/ssl/pp/pp.out
> </..>
>
> The password file pp.out with the 2 password for 2 vhost:
> --------------
> #!/bin/bash
> echo "password1"
> echo "password2"
>
>
> I tried to startssl with 1 vhost, it works ok, but with 2 vhost , it
> shows the following error:
> ----------------------------------------------------------------------------
> -------------------------------------------------------------------
>
>
> [Tue Mar 5 12:48:50 2002] [error] mod_ssl: Init: Pass phrase incorrect
> (OpenSSL library error follows)
> [Tue Mar 5 12:48:50 2002] [error] OpenSSL: error:0D084069:asn1 encoding
> routines:d2i_ASN1_SET:bad tag
> [Tue Mar 5 12:48:50 2002] [error] OpenSSL: error:0D09D082:asn1 encoding
> routines:d2i_RSAPrivateKey:parsing
> [Tue Mar 5 12:48:50 2002] [error] OpenSSL: error:0D09B00D:asn1 encoding
> routines:d2i_PrivateKey:ASN1 lib
>
> Any idea?
>
> Regards
> Bruno Georges
>
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl) www.modssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl) www.modssl.org
> User Support Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]