Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-08-2004, 05:22 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Rep:
|
HTTPS not working under Apache2 and OpenSSL
I've spent over a day searching for the answer to this and had no luck.
I have apache 2.0.49 running on Redhat EL3. Openssl is installed. But HTTPS requests give me an error:
wwwmydomain.com has sent an incorrect or unexpected message. Error Code: -12281
I can start Apache using apachectl startssl just fine and nothing looks out of the ordinary.
Requests to port 443 work when (and only when) apachectl startssl is run. But https will give me that error whether the request is made to port 80 or 443. Nothing looks out of the ordinary in ssl.conf, and openssl seems to generate keys and certificates just fine. I really don't know what else to look at now, and any help would be greatly appreciated.
(small edit: the dot had to be removed between www and mydomain becuase URLs are not allowed in posts for new members)
Last edited by pennywind; 04-08-2004 at 05:24 PM.
|
|
|
04-10-2004, 02:03 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,417
|
But https will give me that error whether the request is made to port 80 or 443.
HTTPS requests are made to port 443 and not 80 (unless you specifically edit the conf for that to work). 443 is the designated port.
Make sure your config is sane, logfiles set, certs and permissions set and config is syntax-tested.focus_ on putting out a well-formed request (https://www.mydomain.com:443/), then check your logfiles for weirdness.
If it still throws an error on port 443 then SSL probably isn't configured correctly. Check with "openssl s_client -state -quiet -connect www.mydomain.com:443" to see if it at least initialises, read/writes cert, key and and cipher info. Post the (logfile) errors (or the URI where to see 'em) and the Apache conf.
BTW (you couldn't know this) but this isn't a security but a configuration problem. I'll move this thread to Linux - General after your reply.
Last edited by unSpawn; 04-10-2004 at 02:04 AM.
|
|
|
04-12-2004, 11:09 PM
|
#3
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Original Poster
Rep:
|
The config file looks sane, the certs and permissions set, I checked both httpd.conf and ssl.conf for wierdness and couldn't find anything, and I double checked the spelling. Nothing seemed wrong except that there was a file stated in the line:
SSLMutex file:/wwwroot/logs/ssl_mutex
that didn't exist. Other than ssl_mutex being missing, I couldn't find anything out of the ordinary
I tried
openssl s_client -state -quiet -connect www.mydomain.com:443
and got the followinf message:
19732:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:475:
I hope this sheds some light on the subject, and I'll look in Linux - General next
|
|
|
04-13-2004, 12:08 AM
|
#4
|
LQ Newbie
Registered: Apr 2004
Posts: 3
Original Poster
Rep:
|
I found something else a little strange.
In /wwwroot/logs/error_log I found this message come up every time I restated apache:
Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d PHP/4.3.5 configured -- resuming normal operations
whats strange about that is that 'openssl version' returns 'OpenSSL 0.9.7a Feb 19 2003'
The SSL version in /wwwroot/logs/error_log doesn't match the version returned with 'openssl version'
|
|
|
04-20-2004, 07:31 PM
|
#5
|
LQ Newbie
Registered: Apr 2004
Location: Warsaw, PL
Distribution: slack 9.1 kernel 2.6.5
Posts: 2
Rep:
|
Quote:
Originally posted by pennywind
The SSL version in /wwwroot/logs/error_log doesn't match the version returned with 'openssl version' [/B]
|
because mod_ssl might have been built using different libssl than your ssl toolkit uses... 
|
|
|
10-20-2004, 11:25 PM
|
#6
|
Member
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 459
Rep:
|
I have the exact same problem, did you ever find a solution?
|
|
|
10-23-2004, 03:28 PM
|
#7
|
LQ Newbie
Registered: Apr 2004
Location: Warsaw, PL
Distribution: slack 9.1 kernel 2.6.5
Posts: 2
Rep:
|
Quote:
Originally posted by ryedunn
I have the exact same problem, did you ever find a solution?
|
Generated all keys 'nstuff ? read_on : man openssl;
If apache is chrooted, check if you have the devs required for ssl to work (chrun/dev/random urandom &c.)? if not, man mknod.
People, could you please reproduce the following:
apache layout (use find), *.conf, also --> resolv.conf and other services,
Before 'nafter starting apache `netstat` and save the output.
post it somewhere and wait for diagnosis... you really can't tell much from what's said here... 
At least a  can't.
RTFM!
P.S.
The difference in OpenSSL versions in http signature and in `openssl -v` doesn't matter. Your openssl toolkit can be one version and the mod_ssl some other (especially if it was a binary installation, or if you used shipped openssl toolkit and not system libs... which AFAIR is the default. This doesn't nmatter...
Last edited by rishta; 10-23-2004 at 03:38 PM.
|
|
|
12-29-2005, 01:45 PM
|
#8
|
LQ Newbie
Registered: Dec 2005
Distribution: gentoo
Posts: 1
Rep:
|
I know its an old thread but....
This is probably caused by not including
"SSLEngine on"
In your <VirtualHosts>
|
|
|
All times are GMT -5. The time now is 08:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|