Listen 443 doesn't work right

Support for webhosts that use CentOS
Post Reply
billrausch
Posts: 4
Joined: 2008/08/14 16:01:46

Listen 443 doesn't work right

Post by billrausch » 2008/08/14 16:22:13

Hi all,

I've been running Centos 4.x on several boxes and have always built Apache 1.xx with PHP 4.xx from source. I recently decided to try being as vanilla as possible so downloaded Centos 5.2 and did a server install. I added a few packages like gcc and ImageMagick to the base install.

When I ran "apachectl start" for the first time, life was good. But when I stopped httpd and added "Listen 443" to the httpd.conf file, I couldn't get apache to start again. I get the following error:

# apachectl start
(98)Address already in use: make_sock: could not bind to address [::]:443
(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

If I run "netstat -pavn | more" nothing is using 443. When I take the Listen 443 back out of the file and start up again, the netstat command shows that httpd is listening on both 80 and 443 even though I haven't told it to. What's going on here? If I take the Listen 80 out of the file, so there are NO Listen lines at all, it still starts and listens on 443.

And I don't get the "Unable to open logs" either. When I run it with only a Listen 80 the logging seems to be working fine.

Also, I've set up "DirectoryIndex index.php index.html index.htm index.shtml". If I connect to http:... it works as expected with either an index.php or an index.html page. If I connect to https:..., then an index.php page will work correctly, but an index.html page is ignored and instead it displays the Apache2 test page powered by CentOS.

I'm baffled. Is this something about Apache2 that I don't grok or something about CentOS 5 that I don't get or have I installed something very wrong or ???

Thanks,

Bill

User avatar
WhatsHisName
Posts: 1546
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Listen 443 doesn't work right

Post by WhatsHisName » 2008/08/14 17:23:49

Listen 443 is defined in the included /etc/httpd/conf.d/ssl.conf

billrausch
Posts: 4
Joined: 2008/08/14 16:01:46

Re: Listen 443 doesn't work right

Post by billrausch » 2008/08/14 17:34:47

Thank you. I never thought to look through the files in conf.d

Bill

User avatar
WhatsHisName
Posts: 1546
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Listen 443 doesn't work right

Post by WhatsHisName » 2008/08/14 18:07:55

You're welcome.

I think we've all done that at least once.

Given that httpd.conf contains "Include conf.d/*.conf", it's always a good idea to review all the conf.d's before you go live to make sure that there are no surprises.

Post Reply

Return to “CentOS 5 - Webhosting Support”