You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by François Beausoleil <fr...@teksol.info> on 2009/02/20 22:49:51 UTC

[users@httpd] SSL configuration read, but not used?

Hi all,

I think I've setup SSL, but Apache just won't use it.  Syntax files  
read OK, and everything seems right, but...  The full details of all  
my config files are here: http://gist.github.com/67695

Below are excerpts.  The server is Ubuntu Intrepid, I'm using Apache  
2.2.9, hosted on Amazon EC2.  The ssl module is loaded.

Apache does listen on ports 80 and 443, as confirmed by lsof and  
netstat.

<VirtualHost _default_:443>
   SSLEngine On
   SSLRequireSSL
   ServerName xlsuite.com
   ServerAlias *.xlsuite.com

   SSLCertificateKeyFile /var/www/xlsuite/releases/20090220205909/ 
config/ssl/_.xlsuite.com/_.xlsuite.com.key
   SSLCertificateFile    /var/www/xlsuite/releases/20090220205909/ 
config/ssl/_.xlsuite.com/_.xlsuite.com.crt

   SSLOptions +StdEnvVars
   BrowserMatch ".*MSIE.*"                       \
               nokeepalive ssl-unclean-shutdown  \
               downgrade-1.0 force-response-1.0

   DocumentRoot /var/www/xlsuite/current/public
   <Directory "/var/www/xlsuite/current/public">
     AllowOverride None
     Options -Indexes +FollowSymlinks
     Order Allow,Deny
     Allow from all
   </Directory>

   RewriteEngine On

   # Check for maintenance file and redirect all requests
   RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
   RewriteCond %{SCRIPT_FILENAME} !maintenance.html
   RewriteRule ^.*$ /system/maintenance.html [L]

   # Deflate
   AddOutputFilterByType DEFLATE text/html text/plain text/xml  
application/xml application/xhtml+xml text/javascript text/css
   BrowserMatch ^Mozilla/4 gzip-only-text/html
   BrowserMatch ^Mozilla/4.0[678] no-gzip
   BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</VirtualHost>

$ openssl s_client -connect localhost:443
CONNECTED(00000003)
22774:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown  
protocol:s23_clnt.c:583:

$ telnet localhost 443
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
asdf
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>asdf to / not supported.<br />
</p>
</body></html>

In the error.log, all I see is this:

[Fri Feb 20 21:48:23 2009] [error] [client 127.0.0.1] Invalid method  
in request \x80t\x01\x03\x01
[Fri Feb 20 21:48:03 2009] [error] [client 127.0.0.1] Invalid method  
in request asdf

I know there's something simple I'm just not doing right.  I've  
checked permissions (see the gist linked above), file ownerships,  
module configuration, searched, read the SSL FAQ, but I just can't  
find what I did wrong.

Thanks for any help!
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.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] SSL configuration read, but not used?

Posted by Karel Kubat <ka...@e-tunity.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Francois,

On Feb 22, 2009, at 2:14 PM, Eric Covener wrote:

> On Sun, Feb 22, 2009 at 7:18 AM, François Beausoleil
> <fr...@teksol.info> wrote:
>> Thanks for replying Eric.  I knew I forgot something.  apache2ctl - 
>> S doesn't
>> even see anything on 443.
>>
>> $ /usr/sbin/apache2ctl -S
>> VirtualHost configuration:
>> wildcard NameVirtualHosts and _default_ servers:
>> *:80                   is a NameVirtualHost
>>        default server xlsuite.com
>> (/var/www/xlsuite/current/config/sites/default.conf:1)
>>        port 80 namevhost xlsuite.com
>> (/var/www/xlsuite/current/config/sites/default.conf:1)
>>        port 80 namevhost xlsuite.com
>> (/var/www/xlsuite/current/config/sites/default.conf:1)
>> Syntax OK
>>
>> What/where else should I look?
>>
>> Thanks!
>
> The stuff you pasted isn't part of your config, check your Include's.

I might've missed this in a previous post, but: check for "Listen  
443". Even if you have your virtual host and SSL stuff set up, if you  
don't have the Listen statement, then that part of the configuration  
won't be used.

- --
Best regards / met vriendelijke groet, Karel Kubat
Mob +31 6 2956 4861



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkmhUgAACgkQ23FrzRzybNVlQACgxn2B/hIL5EdT8ImVV7rewOvS
vnEAoJnuXbVATmbd6dKdWkoxaNezcfD4
=Ieim
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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] SSL configuration read, but not used?

Posted by François Beausoleil <fr...@teksol.info>.
Le 2009-02-22 à 08:14, Eric Covener a écrit :

> On Sun, Feb 22, 2009 at 7:18 AM, François Beausoleil
> <fr...@teksol.info> wrote:
>> Thanks for replying Eric.  I knew I forgot something.  apache2ctl - 
>> S doesn't
>> even see anything on 443.
>>
>> $ /usr/sbin/apache2ctl -S
>>        port 80 namevhost xlsuite.com
>> (/var/www/xlsuite/current/config/sites/default.conf:1)
>> Syntax OK
>>
> The stuff you pasted isn't part of your config, check your Include's.


I simplified the configuration slightly, but my includes were  
correct.  But your message made me realize something. My SSL  
configuration file started with an underscore:  /var/www/xlsuite/ 
current/config/sites/_.xlsuite.com.conf

I changed my filename to not start with the underscore, and boom, my  
config was being read again.

I now get different errors (key is encrypted, but shouldn't be), but  
I'll be fine now.

Thank you very much!
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.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] SSL configuration read, but not used?

Posted by Eric Covener <co...@gmail.com>.
On Sun, Feb 22, 2009 at 7:18 AM, François Beausoleil
<fr...@teksol.info> wrote:
> Thanks for replying Eric.  I knew I forgot something.  apache2ctl -S doesn't
> even see anything on 443.
>
> $ /usr/sbin/apache2ctl -S
> VirtualHost configuration:
> wildcard NameVirtualHosts and _default_ servers:
> *:80                   is a NameVirtualHost
>         default server xlsuite.com
> (/var/www/xlsuite/current/config/sites/default.conf:1)
>         port 80 namevhost xlsuite.com
> (/var/www/xlsuite/current/config/sites/default.conf:1)
>         port 80 namevhost xlsuite.com
> (/var/www/xlsuite/current/config/sites/default.conf:1)
> Syntax OK
>
> What/where else should I look?
>
> Thanks!

The stuff you pasted isn't part of your config, check your Include's.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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] SSL configuration read, but not used?

Posted by François Beausoleil <fr...@teksol.info>.
Thanks for replying Eric.  I knew I forgot something.  apache2ctl -S  
doesn't even see anything on 443.

$ /usr/sbin/apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
          default server xlsuite.com (/var/www/xlsuite/current/config/ 
sites/default.conf:1)
          port 80 namevhost xlsuite.com (/var/www/xlsuite/current/ 
config/sites/default.conf:1)
          port 80 namevhost xlsuite.com (/var/www/xlsuite/current/ 
config/sites/default.conf:1)
Syntax OK

What/where else should I look?

Thanks!
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

Le 2009-02-20 à 18:51, Eric Covener a écrit :

> On Fri, Feb 20, 2009 at 4:49 PM, François Beausoleil
> <fr...@teksol.info> wrote:
>> Hi all,
>>
>> I think I've setup SSL, but Apache just won't use it.  Syntax files  
>> read OK,
>> and everything seems right, but...  The full details of all my  
>> config files
>> are here: http://gist.github.com/67695
>>
>> Below are excerpts.  The server is Ubuntu Intrepid, I'm using  
>> Apache 2.2.9,
>> hosted on Amazon EC2.  The ssl module is loaded.
>>
>> Apache does listen on ports 80 and 443, as confirmed by lsof and  
>> netstat.
>>
>> <VirtualHost _default_:443>
>> SSLEngine On
>
> My guess is you have an overlapping virtualhost with * or *:443.
> apachectl/apache2ctl/httpd -S would probably show you where.
>
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] SSL configuration read, but not used?

Posted by Eric Covener <co...@gmail.com>.
On Fri, Feb 20, 2009 at 4:49 PM, François Beausoleil
<fr...@teksol.info> wrote:
> Hi all,
>
> I think I've setup SSL, but Apache just won't use it.  Syntax files read OK,
> and everything seems right, but...  The full details of all my config files
> are here: http://gist.github.com/67695
>
> Below are excerpts.  The server is Ubuntu Intrepid, I'm using Apache 2.2.9,
> hosted on Amazon EC2.  The ssl module is loaded.
>
> Apache does listen on ports 80 and 443, as confirmed by lsof and netstat.
>
> <VirtualHost _default_:443>
>  SSLEngine On

My guess is you have an overlapping virtualhost with * or *:443.
apachectl/apache2ctl/httpd -S would probably show you where.


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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