Linux-Noob Forums

Full Version: Apache 2 & SSL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I'm rapidly reaching my wits end here, seriously...I'm going crazy trying to get this apache server to use SSL...HELP!

All actual IP addresses have been removed and/or replaced with "IP"

 

I already have apache installed on RHEL3 working on port 80. If I change Listen in httpd.conf to 443 I get the following error with FireFox:

Quote:IP has sent an incorrect or unexpected message. Error Code: -12281.
In /www/log/access_log I see:

Code:
[23/May/2006:11:32:19 -0500] "\x80g\x01\x03" 200 27497
[23/May/2006:11:32:40 -0500] "\x80g\x01\x03" 200 27497




 

 

So I tried to start from scratch and recompile apache with openssl



Code:
wget http://www.openssl.org/source/openssl-0.9.8b.tar.gz
tar xvzf openssl-0.9.8b.tar.gz
cd openssl-0.9.8b
ls
./config
make
make test
make install
make clean




 



Code:
cd httpd-2.2.2
./configure --prefix /usr/local/apache2 --enable-mods-shared=all --enable-ssl --with-ssl=/usr/bin/openssl
make
make install
make clean
mkdir /usr/local/apache2/conf/ssl.crt
mkdir /usr/local/apache2/conf/ssl.key
openssl req -new -out server.csr
openssl rsa -in privkey.pem -out server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
rm privkey.pem
rm server.csr
mv server.crt /usr/local/apache2/conf/ssl.crt/
mv server.key /usr/local/apache2/conf/ssl.key/




 

I added the paths to httpd-ssl.conf for the crt and key file, I changed Listen from 80 to 443, I tried changing it to the servers IP address:443 and I still get;

 

Quote:[root@myserver root]# /usr/local/apache2/bin/apachectl start(98)Address already in use: make_sock: could not bind to address IP:443

no listening sockets available, shutting down

Unable to open logs
[img]<___base_url___>/uploads/emoticons/default_mad.gif[/img] 

iptables is stopped and using port 80 works just fine. What the hell is going on here?

 



Code:
lsof -i tcp:443
netstat -lan |grep :443
netstat -pan |grep LISTEN




All show nothing listening on 443

 

I really need help here, I'm very very confused to why this is not working.

I took out Listen 443 and commented out duplicates in httpd-ssl.conf and it actually started. Perhaps I just needed a day to get my head straight.