Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created a portable (relative paths) Apache installation. It works perfectly on my 32-bit system, but when I try to run it on a 64-bit system, it gives the following error:

>httpd -t
httpd: Syntax error on line … of …/httpd.conf: Cannot load …/modules/mod_ssl.so into server: %1 is not a valid Win32 application.

If I comment out the line that includes SSL.conf, then the server runs on the 64-bit system, but of course without SSL support.

I have tried searching for this but cannot find anything helpful. Does anybody know how to get Apache to use SSL on a 64-bit system (preferably in a way that is compatible with a 32-bit system)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Using Process Monitor, I observed the file and registry entry accesses that Apache makes when loading.

I noticed that httpd loads the file libeay32.dll at the end of the trace (just before it errors out). I tried putting a copy of libeay32.dll from a 64-bit Apache package I got from ApacheLounge in Apache’s bin directory, but it still gave the same error. (I suppose that should not be a surprise, because the file it was previously loading was a already a 64-bit copy from some folder—which is in the PATH—where one of the laptop’s 64-bit drivers are installed.)

I then put a 32-bit copy of libeay32.dll (and ssleay32.dll) that I got from the standard package, et voilà! Apache runs with SSL support on a 64-bit system! Moreover, because the copy of libeay32.dll is 32-bits, it still runs on the 32-bit system without modification (i.e., no detecting the system and replacing files or even conf-file hacks)!

(I’m glad I put the error message in the title of the question because it will hopefully help direct others with this problem—which I struggled with for several months—to this page where they can finally find the solution. ☺)

share|improve this answer
I had a similar problem and ended up using the libeay32.dll (and ssleay32.dll from a 32-bit version of PHP 5.5 (in my case I had to replace the ones that came with PHP v5.3 with the ones included in v5.5) –  Costa May 24 at 5:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.