# Apache2: could not bind to address 0.0.0.0:443

## why knot

Getting the following error message:

```
# /etc/init.d/apache2 start

 * Starting apache2 ...

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

I get no output from 

```
# fuser 443/tcp
```

and

```
# telnet localhost 443

Trying 127.0.0.1...

telnet: connect to address 127.0.0.1: Connection refused
```

So I'm pretty sure nothing is current bound to port 443.

Any Ideas?

Apache starts fine when I remove the line "listen 443" from httpd.conf and remove the "-D SSL -D SSL_DEFAULT_VHOST" options from /etc/conf.d/apache2, so it is just the ssl option apache is struggling with.

Thanks,

Why Knot

----------

## jmbsvicetto

Hi.

What's the output of netstat -tan?

It seems you already have some process bound to the SSL port.

----------

## hanj

I would agree.. also it could possibly be a unclean shutdown

Do a:

```
ps aux | grep apache
```

If you see something, kill that process then zap apache and start again.

hanji

----------

## why knot

I kind of figured that if I had something bound to the SSL port that either telnet would have responded differently or at least fuser should have responded with programs bound to that port.  To try both of your suggestions:

```
localhost apache2 # netstat -tan

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address           Foreign Address         State      

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      

tcp        0      0 192.168.1.112:36143     216.165.191.52:6667     ESTABLISHED 

tcp        0      0 192.168.1.112:44324     205.188.248.133:5190    ESTABLISHED 

tcp        0      0 192.168.1.112:34937     72.14.253.104:80        ESTABLISHED 

tcp        0      0 192.168.1.112:47265     205.188.8.136:5190      ESTABLISHED 

localhost apache2 # ps aux|grep apache

root     14212  0.0  0.0   1520   456 pts/3    R+   22:59   0:00 grep --colour=auto apache

localhost apache2 #

```

Neither of these seem to indicate any processes holding port 443.  Which is so strange, because that is exactly what the error message seems to imply the problem is.  This is my first time trying to bring Apache with ssl online, so I could have some fundamental configuration errors, I just don't know what they would be.  None of the logs in /var/log/apache2/ recorded anything from this event, so there is nothing to post from there.  Let me know if there are other useful things you would like me to post.

~Why Knot

----------

## jmbsvicetto

Well,

if you have no other program running on the SSL port, did you create the X.509 certificates for Apache? Have you re-checked your apache SSL config?

----------

