You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by nico <tr...@hotmail.com> on 2003/08/17 14:02:37 UTC
[users@httpd] {Problem] Apache 2 + Open SSL
Hello
I have a problem with apache 2 and OpenSSL
I can connect with shell to openssl but when I try to connect with https
my different brownser return me this error : "unkown socket etc"
ps : http work fine
No error are displayed when I start apache.
My httpd.conf
<VirtualHost 127.0.0.1:443>
SSLEngine on
SSLCertificateFile \
/usr/local/openssl/certs/www.test.com.cert
SSLCertificateKeyFile \
/usr/local/openssl/certs/www.test.com.key
ServerAdmin webmaster@iii.com
DocumentRoot /
ServerName test.com
ErrorLog logs/test.com-error_log
CustomLog logs/test.com-access_log common
</VirtualHost>
With shell :
/usr/local/apache/bin/apachectl start
Apache/2.0.47 mod_ssl/2.0.47 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.
Server test.com:443 (RSA)
Enter pass phrase:
And the error_log file :
[Sun Aug 17 09:41:45 2003] [warn] Init: Session Cache is not configured
[hint: SSLSessionCache]
[Sun Aug 17 09:41:46 2003] [notice] Apache/2.0.47 (Unix) mod_ssl/2.0.47
OpenSSL/0.9.7b PHP/4.3.2 configured -- resuming normal operations
What is wrong in my configuration ?
thanks in advance
bye
Re: [users@httpd] {Problem] Apache 2 + Open SSL
Posted by Robert Andersson <ro...@profundis.nu>.
nico wrote:
> Listen 80
> Listen 443
You should probably give the IP to the latter directive, as it otherwise
will try to bind on all interfaces, which is usually not what you want.
> <IfDefine SSL>
> <VirtualHost www.test.com:443>
> DocumentRoot "/usr/local/apache/htdocs"
> ServerName www.test.com
> ServerAdmin test
> ErrorLog /usr/local/apache/logs/error_log
> TransferLog /usr/local/apache/logs/access_log
> SSLEngine on
> SSLCertificateFile /usr/local/apache/conf/ssl.crt/www.test.com.cert
> SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/www.test.com.key
> </VirtualHost>
> </IfDefine>
Is this your only VirtualHost? What is your 'global' ServerName set to? It
is also better to state the real IP instead of FQDN in the VirtualHost
block, eg: 1.2.3.4:443.
> But now when I start apache I have that :
>
> [root@localhost root]# /usr/local/apache/bin/apachectl startssl
>
> [Mon Aug 18 10:21:16 2003] [warn] VirtualHost www.test.com:443 overlaps
with
> VirtualHost www.test.com:443,
> the first has precedence, perhaps you need a NameVirtualHost directive
Do you have two VirtualHosts on <ip>:443? I'm not sure what else would cause
that message.
> (98)Address already in use: make_sock: could not bind to address
0.0.0.0:443
Was Apache already running? Something is sitting on port 443.
> [Mon Aug 18 10:08:21 2003] [warn] RSA server certificate CommonName (CN)
> `test.com' does NOT match server name!?
I'm no SSL guru, but it might help if you set the VirtualHost's ServerName
to test.com and use ServerAlias www.test.com.
> What's wrong now ?
As stated, I have not worked much with SSL and have no current installation
near at hand to test on, so I'm not sure I can help you more than throwing
some ideas in your direction.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] {Problem] Apache 2 + Open SSL
Posted by nico <tr...@hotmail.com>.
> nico wrote:
> > And in the logs there is no error message displayed.
>
> Is there anything in the access log?
=> No there is only http request written in the access_log nothing from
https
> If both access and error log is untouched by a request, it implies that
> Apache never sees it.
>
> > I get every time this error from my brownser : "unkown socket type"
>
> Have you tried with a different browser? I cannot recall ever seeing such
> error, which leads me to think that this is a client error. You might want
> to setup a sniffer (eg. Ethereal) to confirm this, or get clues about what
> is causing the error.
=> I have tried with 2 different brownser and I have the same type of error
when I try to access https (I have tried with mozilla and gaelon)
Now I have change my httpd.conf and new erros are displayed
So my httpd.conf is now ;
Listen 80
Listen 443
<IfDefine SSL>
<VirtualHost www.test.com:443>
DocumentRoot "/usr/local/apache/htdocs"
ServerName www.test.com
ServerAdmin test
ErrorLog /usr/local/apache/logs/error_log
TransferLog /usr/local/apache/logs/access_log
SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/www.test.com.cert
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/www.test.com.key
</VirtualHost>
</IfDefine>
But now when I start apache I have that :
[root@localhost root]# /usr/local/apache/bin/apachectl startssl
[Mon Aug 18 10:21:16 2003] [warn] VirtualHost www.test.com:443 overlaps with
VirtualHost www.test.com:443,
the first has precedence, perhaps you need a NameVirtualHost directive
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs
And in the errors_logs
[Mon Aug 18 10:08:21 2003] [warn] RSA server certificate CommonName (CN)
`test.com' does NOT match server name!?
[Mon Aug 18 10:08:21 2003] [warn] RSA server certificate CommonName (CN)
`test.com' does NOT match server name!?
[Mon Aug 18 10:08:21 2003] [warn] RSA server certificate CommonName (CN)
`test.com' does NOT match server name!?
[Mon Aug 18 10:08:21 2003] [warn] RSA server certificate CommonName (CN)
`test.com' does NOT match server name!?
[Mon Aug 18 10:08:22 2003] [notice] Apache/2.0.47 (Unix) mod_ssl/2.0.47
OpenSSL/0.9.7b PHP/4.3.2 configured -- resuming normal operations
[Mon Aug 18 10:15:18 2003] [notice] caught SIGTERM, shutting down
So apache doesn't start anymore.
What's wrong now ?
thanks
> Regards,
> Robert Andersson
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] {Problem] Apache 2 + Open SSL
Posted by Robert Andersson <ro...@profundis.nu>.
nico wrote:
> And in the logs there is no error message displayed.
Is there anything in the access log?
If both access and error log is untouched by a request, it implies that
Apache never sees it.
> I get every time this error from my brownser : "unkown socket type"
Have you tried with a different browser? I cannot recall ever seeing such
error, which leads me to think that this is a client error. You might want
to setup a sniffer (eg. Ethereal) to confirm this, or get clues about what
is causing the error.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] {Problem] Apache 2 + Open SSL
Posted by nico <tr...@hotmail.com>.
I have try to start apache with
/usr/local/apache/bin/apachectl startssl
=> openssl prompt me for the pass
I give him the pass all is OK apache start http work but https doens't work
at all
And in the logs there is no error message displayed.
I get every time this error from my brownser : "unkown socket type"
What should I do ? :-(
>
> With shell :
>
> /usr/local/apache/bin/apachectl start
>
> One simple thing I noticed, you should be using startssl.
>
> /usr/local/apache/bin/apachectl startssl
>
> I'd try that and see if it gets you any farther.
>
> Leif
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] {Problem] Apache 2 + Open SSL
Posted by Leif W <wa...@usa.net>.
----- Original Message -----
From: nico
To: users@httpd.apache.org
Sent: Sunday, August 17, 2003 8:02 AM
Subject: [users@httpd] {Problem] Apache 2 + Open SSL
With shell :
/usr/local/apache/bin/apachectl start
One simple thing I noticed, you should be using startssl.
/usr/local/apache/bin/apachectl startssl
I'd try that and see if it gets you any farther.
Leif
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org