# You configured HTTPS(443) on the standard HTTP(80) port!

## eric__1234

Hello,

I'm running Apache version 2.2.6, when the server starts up, the following warning message appears in the error_log:

[Wed Oct 10 17:37:59 2007] [warn] Init: (www.mydomain.tld:80) You configured HTTPS(443) on the standard HTTP(80) port!

In fact I haven't configured anything, I'm using the default configuration files that were delivered when I emerged Apache.  In particular, in file

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf

I have

Listen 443

When the server runs I get certain glitches accessing "https" URLs and I suspect the warning above points to the root cause.  What am I doing wrong?

Thanks,

Eric

----------

## erik258

You shouldn't listen on 443.  If you are running a default setup, I don't think SSL is enabled; you should listen to port 80.  However, I don't think you have to specify the port, although maybe I'm wrong.

----------

## eric__1234

Hi Erik,

Thanks for getting back to me.

 *erik258 wrote:*   

> You shouldn't listen on 443.  If you are running a default setup, I don't think SSL is enabled; you should listen to port 80.  However, I don't think you have to specify the port, although maybe I'm wrong.

 

Sorry that was not correct for me to say that I running a default setup.  I have enabled SSL and I rely on it for certain applications.  I mean that apart from enabling SSL I haven't knowingly customized it at all.

In file /etc/conf.d/apache2 I have

APACHE2_OPTS="-D DEFAULT_VHOST -D SVN -D SVN_AUTHZ -D DAV -D DAV_FS -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D MAILMAN"

In file /etc/apache2/vhosts.d/default_vhost.include I have

ServerName www.mydomain.tld:80

    <Directory "/var/www/localhost/htdocs/foo">

     AuthType Basic

     AuthName "Restricted Files"

     AuthUserFile /var/svn/conf/svnusers

     Require valid-user

    </Directory>

I have used htpasswd2 to set up the AuthUserFile indicated above.

In file /etc/apache2/vhosts.d/00_default_vhost.conf I have

Listen 80

NameVirtualHost *:80

<VirtualHost *:80> [snipped] </VirtualHost>

In file /etc/apache2/vhosts.d/00_default_ssl_vhost.conf I have

Listen 443

<VirtualHost _default_:443>

        SSLCertificateFile /etc/apache2/ssl/server.crt

        SSLCertificateKeyFile /etc/apache2/ssl/server.key

	... [snipped] ...

</VirtualHost>

The items SSLCertificateFile/SSLCertificateKeyFile correspond to self-signed certificates that I created.

SSL seems to work in OK in the base case where a user attempts to visit a protected page, is presented with a certificate and then prompted for his credentials before being allowed to proceed.

There's an error in webmail when attempting to send a message, the browser displays 

www.mydomain.tld has sent an incorrect or unexpected message.  Error Code: -12263

The following messages are logged:

In file /var/log/apache2/access_log:

[client address] - - [11/Oct/2007:16:27:29 +0000] "\x16\x03\x01" 501 281

In file /var/log/apache2/error_log:

[Thu Oct 11 16:27:29 2007] [error] [client address] Invalid method in request \x16\x03\x01

I believe the "\x16\x03\x01" indicates that a client is trying to speak https to a port that is expecting http.  This is consistent with the error message from Apache at startup, as mentioned in my initial post:

[Wed Oct 10 17:37:59 2007] [warn] Init: (www.mydomain.tld:80) You configured HTTPS(443) on the standard HTTP(80) port!

I just can't figure out what I have done wrong to cause https on port 80.  I would be grateful for any suggestions on how to troubleshoot this problem.

Regards,

Eric

----------

