Did you ever get any help with this? I am having the same issue with getting a system with both Tomcat and Apache to use SSL.
Right now I am getting this error:
Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 Unable to open logs
===============================================
PostgreSQL
===============================================
tar -xvzf postgresql_xxx.tar.gz
cd postgresql_xxx
./configure --prefix=/usr/local/pgsql make
make install
------------------------------------------------
Start the database server
------------------------------------------------
exit (return to root user)
root# vi /usr/local/pgsql/data/logfile (create file)
root# chown pgsqlgsql /usr/local/pgsql/data/logfile
root# vi /usr/local/pgsql/pg_hba.conf
(add IP: 172.18.0.0 Mask: 255.255.0.0)
root# chown -R pgsqlgsql /usr/local/pgsql
root# su pgsql
pgsql# cd /usr/local/pgsql/bin
pgsql# ./postmaster -i -D /usr/local/pgsql/data > /usr/local/pgsql/data/logfile 2>&1
(allow remote server access)
or
pgsql# ./pg_ctl -D /usr/local/pgsql/data -l logfile start
(start in background and with logfile)
(only local server access)
------------------------------------------------
Stop the database server
------------------------------------------------
root# kill (pid)
===============================================
Openssl
===============================================
cd /usr/src/openssl-0.9.7
./config --prefix=/usr/local/openssl
make
make test
make install
===============================================
apache_1.3.28
===============================================
Download Apache 1.3.28 source
at
cd /usr/src2/php-4.3.2
./configure --prefix=/usr/local/php --with-apache=/usr/src2/apache_1.3.28 --with-pgsql=/usr/local/pgsql --enable-trans-sid --enable-track-vars --enable-sysvshm=yes --enable-sysvsem=yes --enable-versioning
make
make install
cp php.ini-dist /usr/local/php/lib/php.ini
edit /usr/local/php/lib/php.ini
register_globals = On
===============================================
apache_1.3.27
===============================================
./configure --prefix=/usr/local/apache --enable-module=ssl --enable-module=so --activate-module=src/modules/php4/libphp4.a --enable-rule=SSL_SDBM --enable-module=rewrite
make
make certificate TYPE=custom <---- this line willl generate CA Cert & Server Cert
make install
---------------------------
if only apache+php
---------------------------
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a --enable-module=so make
make install
===============================================
apache config
===============================================
------------------------------------------------
Add This: in /usr/local/apache/conf/httpd.conf
------------------------------------------
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
ServerName 172.18.1.22
DocumentRoot /usr/local/apache/htdocs (Optional)
User www
Group www
------------------------------------------------
Start Apache server
------------------------------------------------
/usr/local/apache/bin/apachectl start
/usr/local/apache/bin/apachectl startssl
===============================================
start when boot up
===============================================
edit /etc/rc.d/rc.local
add these line:
====================================================================
Create a directory called "jk" under $CATALINA_HOME/conf
Add workers.properties to the jk directory:
====================================================================
(change tomcat version, change host)
====================================================================
edit /usr/local/jakarta-tomcat-4.1.24/conf/server.xml
====================================================================
(The Listener tags are what causes Tomcat to automatically create the conf/auto/mod_jk.conf file on startup)
1. Verify that the following lines are immediately after the <Server port="8005" ...> declaration:
2. Add the following lines after the <Service name="Tomcat-Standalone"> declaration:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
3. Finally, after any <Host name="localhost"> declarations, add a listener:
(The append attribute means to append to the existing conf/auto/mod_jk.conf file)
4. Start or restart Tomcat. If everything worked correctly, you will now have a mod_jk.conf file in $CATALINA_HOME/conf/auto.
If not, better look over this section again
====================================================================
edit /usr/local/apache/conf/httpd.conf
====================================================================
-----------------------------------------------
hard code the mod_jk
-----------------------------------------------
1. Add the following to the LoadModules section:
2. Add the following to the end of httpd.conf:
(This is all an example. You will have to set the paths for JkWorkersFile and JkLogFile as approriate.
You should make one entry for each webapp you want to expose via mod_jk.)
4. edit your httpd.conf
look for this directive "SSLPassPhraseDialog builtin" and change to
SSLPassPhraseDialog exec:/root/passphrase
or wherever your passphrase file is the contents of the file passphrase is:
#!/bin/sh
echo "your passphrase"
and then chmod 500 the file for security
----------------------------------------------------------
====================================================================
Test httpd.conf configuration
====================================================================
/usr/local/apache/bin/apachectl configtest
====================================================================
Testing
====================================================================
*** Always
start Tomcat first
start Apache.
stop Apache first
stop or restart Tomcat
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.