DeveloperSide.NET Forums

DeveloperSide.NET => Building a Web Server, for Linux => Topic started by: Bruce on November 21, 2003, 03:50:21 AM



Title: Can't Start Apache2.0.48 with SSL
Post by: Bruce on November 21, 2003, 03:50:21 AM
Hi, Buddy,

I installed RedHat 9.0, and with the built-in Apache 2.0.40 + mod_ssl 2.0.40. The apache web server worked well. And can start with SSL.

After I found this site, I followed the steps in this site, and upgraded the apache to 2.0.48. and installed apache-mod_ssl-2.0.48-0.1.i586.rpm. I can start apache 2.0.48 without SSL. When start apache with SSL, it is failed. The error message is followed as:

Syntax error on line 270 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: SSL_library_init

ps: line 270 of httpd.conf is listed as:

 LoadModule ssl_module modules/mod_ssl.so

I checked the file mod_ssl.so is existed in the modules directory.

Any one can help me to resolve it?

Thanks a lot.

Bruce


Title: Can't Start Apache2.0.48 with SSL
Post by: Anonymous on November 21, 2003, 05:41:02 AM
There are no instructions or build steps for the apache RPM package you listed on this site.

What is apache-mod_ssl-2.0.48-0.1.i586.rpm and why are you using this?

The instructions for building Apache2 on this site contain all the steps. The only thing that is downloaded is apache-2.0.48.tar.gz


Title: Can't Start Apache2.0.48 with SSL
Post by: Anonymous on November 21, 2003, 05:47:04 AM
Now if you just rpm installed that package, that error could mean that the library that mod_ssl is using, is not on your system.  The old one is.  Which would be consistent with what you said.

If this is what you did, what "instructions" did you use?  RPM installs are just one line and nothing more.  The instructions on this site are pages long and take you from building to setting up.


Title: Can't Start Apache2.0.48 with SSL
Post by: Anonymous on November 21, 2003, 05:49:43 AM
The basic apache-2.0.48.tar.gz contains all the needed mod_ssl code.


Title: Thanks a lot.
Post by: Bruce on November 22, 2003, 07:10:11 AM
Hi there,

Thank you very much for your tips. I remove the apache-mod_ssl-2.0.48-0.1.i586.rpm, and re-install the apache 2.0.48 followed the instruction of the site. Right now, it works well with SSL.

Thank you very much.

Bruce


Title: Can't Start Apache2.0.48 with SSL
Post by: alexus on June 21, 2004, 11:52:31 PM
i'm too geting this error:

Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: Undefined symbol "X509_free"

although i dont use redhat, i got a source code from apache site and i compiled it with ssl support.. and while i'm trying to start w/ ssl support i get this error:

Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: Undefined symbol "X509_free"

any ideas, anyone?


Title: Can't Start Apache2.0.48 with SSL
Post by: Anonymous on July 02, 2004, 04:30:21 PM
Code:
Installing Apache

cp httpd-2.0.50.tar.gz /usr/local/.
tar xzvf httpd-2.0.50.tar.gz
cd /usr/local/httpd-2.0.50
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-deflate --enable-ssl
make
make install
mkdir ssl.crt ssl.key
cp /usr/local/apache_1.3.29/conf/ssl.crt/server.crt ssl.crt/.
cp /usr/local/apache_1.3.29/conf/ssl.key/server.key ssl.key/.



Configuring httd.conf

vi httpd.conf

#Listen 80

#ServerAdmin you@example.com
ServerAdmin root@web.com

#ServerName www.example.com:80
ServerName *.*.*.*

#DocumentRoot "/usr/local/apache2/htdocs"
DocumentRoot "/home/tomcat/jakarta-tomcat-3.2.3/webapps"



    Alias /m2i/ "/home/tomcat/jakarta-tomcat-3.2.3/webapps/web1/"
    <Directory "/home/tomcat/jakarta-tomcat-3.2.3/webapps/web1">
        Options -Indexes FollowSymlinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>



    Alias /adminm2i/ "/home/tomcat/jakarta-tomcat-3.2.3/webapps/web2/"
    <Directory "/home/tomcat/jakarta-tomcat-3.2.3/webapps/web2">
        Options -Indexes FollowSymlinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>



Configuring ssl.conf

vi ssl.conf

<VirtualHost _default_:443>

#   General setup for the virtual host
#DocumentRoot "/usr/local/apache2/htdocs"
#ServerName www.example.com:443
#ServerAdmin you@example.com

DocumentRoot "/home/tomcat/jakarta-tomcat-3.2.3/webapps/web1"
ServerName *.*.*.*
ServerAdmin root@web.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log

Include /home/tomcat/jakarta-tomcat-3.2.3/conf/mod_jk.conf



Creating mod_jk

Creating mod_jk.so

cd /home/tomcat/jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
./configure --with-apxs=/usr/local/apache2/bin/apxs
make
cd apache-2.0
/usr/local/apache2/bin/apxs -n jk -i mod_jk.so

Change following parameter in mod_jk.conf

LoadModule jk_module modules/mod_jk.so
#LoadModule jk_module libexec/mod_jk.so


Title: Can't Start Apache2.0.48 with SSL
Post by: admin on July 02, 2004, 05:08:11 PM
The error is a result of trying to link a static build of openssl libs dynamically into mod_ssl.

Just google for those Undefined symbols.


Title: Can't Start Apache2.0.48 with SSL
Post by: armemon on December 30, 2004, 05:04:54 PM
I am facing the same issue and same error message of X509_free undefind symbol.

Can some one help me out.
How to link the dynamic and static as mentioned in the last messange.

thanks
armemon


Title: Can't Start Apache2.0.48 with SSL
Post by: admin on December 30, 2004, 10:54:29 PM
http://www.devside.net/web/server/linux


Title: Can't Start Apache2.0.48 with SSL
Post by: armemon on December 31, 2004, 04:59:14 PM
Followed steps according to the web site link, But seems that problem still exists with
Syntax error on line 252 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: X509_free

Going through the discussion of previous, and while running the #ldd httpd
found out that there is nothing on SSL,.. I though there should be,.. and what steps are required to have,.. Any Help???

root@rohri /usr/local/apache2/bin]# ldd httpd
        linux-gate.so.1 =>  (0xffffe000)
        libz.so.1 => /usr/local/lib/libz.so.1 (0x40027000)
        libaprutil-0.so.0 => /usr/local/apache2/lib/libaprutil-0.so.0 (0x4003a000)
        libdb-4.1.so => /usr/lib/libdb-4.1.so (0x40050000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4011d000)
        libapr-0.so.0 => /usr/local/apache2/lib/libapr-0.so.0 (0x4013e000)
        librt.so.1 => /lib/tls/librt.so.1 (0x4015e000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40172000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40195000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x401c3000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x401d6000)
        libdl.so.2 => /lib/libdl.so.2 (0x401e6000)
        libc.so.6 => /lib/tls/libc.so.6 (0x401e9000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Title: Can't Start Apache2.0.48 with SSL
Post by: admin on January 01, 2005, 01:31:50 AM
You rebuild OpenSSL, copied the libs and updated the run-time linker, and rebuilt Apache with the proper openssl location in the config line?


Title: Can't Start Apache2.0.48 with SSL
Post by: jaybuc on January 18, 2005, 09:00:39 PM
I have been having the same issue getting this error when running ./apachectl startssl

Syntax error on line 251 of /usr/local/apache2.0.52/conf/httpd.conf:
Cannot load /usr/local/apache2.0.52/modules/mod_ssl.so into server: ld.so.1: /ud

I know that i need to rebuild openssl with shared option, but my question is what do i do with the current Apache and Openssl configurations? Do i just tar up the directories??
Thanks


Title: Can't Start Apache2.0.48 with SSL
Post by: admin on January 18, 2005, 11:26:51 PM
You need to rebuild openssl and then Apache.
You either do this over your existing installation, or you shut it down and put everything under /usr/local.
http://www.devside.net


Title: Can't Start Apache2.0.48 with SSL
Post by: apatchy on January 24, 2006, 08:44:07 PM
im having this same problem.  i followed the guide @ http://www.devside.net/web/server/linux here but it still is givng me the error:

Code:
Cannot load /usr/local/apache2/modules/mod_ssl.so into server: /usr/local/apache2/modules/mod_ssl.so: undefined symbol: X509_free


I'm stumped! :(

Suse 9.2 Enterprise Server


Title: Can't Start Apache2.0.48 with SSL
Post by: apatchy on January 24, 2006, 09:09:19 PM
oh, i just found the solution.

in your apache ./configure line, change

"--enable-ssl=shared" or "--enable-ssl"

to

"--enable-ssl=static"

good luck y'all


Title: Can't Start Apache2.0.48 with SSL
Post by: admin on January 24, 2006, 11:01:10 PM
That will work, if you want to build mod_ssl statically instead of dynamically.

You problem usually happens when you build OpenSSL as a static lib, and then try to have apache load is as a dynamic module.

When you built openssl, did you do this:

.../openssl-0.9.8a]# ./config shared ...

Did you put in the "shared", as the instructions say?

If you did, than you most likely have an older OpenSSL that came with your distro, and you did not "Update the Run-time Linker".

Check this thread for more info...
http://forums.devside.net/viewtopic.php?t=460
It does not seem to work for users with Suse, but has for others.
Try out all the ldd, which, version, etc...

Also check Google...
http://www.google.com/search?q=X509_free+suse