Installing Apache 2.2.11 with Weblogic 10.3 on Ubuntu 9.04 64 bit

This post takes you through the steps to install Apache 2.2.11 on Ubuntu 9.04 64 bit and make it work with Weblogic 10.3. The post walks through the steps that I followed, the problems that I faced and the solutions ( er..hacks) to get them resolved.

Installing Apache

sudo apt-get install apache2

If you want to build it from sources then follow these steps.

Apache config files are in /etc/apache
Apache log files are in /var/log/apache
Apache libs are in /usr/lib/apache
Other files can be in /usr/share/apache, /var/lib/apache
executables in /usr/sbin apache and apache2ctl

vhazrati@vhazrati-laptop:/usr/sbin$ sudo apache2ctl start

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

You should be able to access the default page on http://localhost now and see It Works!

Now, Integrating with Weblogic


http://download.oracle.com/otn/bea/weblogic/server103/server103_apacheplugins.zip

<apache-plugin-unzip-location>linux/x86_64

/usr/lib/apache2/modules

vhazrati@vhazrati-laptop:/usr/lib/apache2/modules$ ldd mod_wl_22.so
linux-vdso.so.1 =>  (0×00007fff02ffe000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0×00007f5cfaaff000)
libm.so.6 => /lib/libm.so.6 (0×00007f5cfa87a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0×00007f5cfa661000)
libc.so.6 => /lib/libc.so.6 (0×00007f5cfa2ef000)
/lib64/ld-linux-x86-64.so.2 (0×00007f5cfafc5000)

-bash-3.00$ ldd mod_wl_22.so
libstdc++.so.5 => not found
libm.so.6 => /lib64/tls/libm.so.6 (0×0000002a9572f000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0×0000002a958b5000)
libc.so.6 => /lib64/tls/libc.so.6 (0×0000002a959c3000)
/lib64/ld-linux-x86-64.so.2 (0×000000552aaaa000)

LoadModule weblogic_module /usr/lib/apache2/modules/mod_wl_22.so

/etc/apache2/mods-enabled

<Location /medrec>
SetHandler weblogic-handler
WebLogicHost 127.0.1.1
WebLogicPort 7011
</Location>

This would help in redirecting a request like http://localhost/medrec to the weblogic server running on 127.0.1.1 and at 7011 port with the application name medrec.

vhazrati@vhazrati-laptop:/usr/sbin$ sudo apache2ctl restart

vhazrati@vhazrati-laptop:/usr/sbin$ apache2 -t -D DUMP_MODULES
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_worker_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
weblogic_module (shared)

http://localhost/medrec/

vhazrati@vhazrati-laptop:/usr/sbin$ apache2 -t
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
Syntax OK

Other Potential Problem(s)

this is because the value of ${APACHE_RUN_USER} is not getting picked up. Ideally it should be picked up from /etc/apache2/envvars

which has the following entries

# envvars – default environment variables for apache2ctl

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2.pid

However, still in your case if these values are not picked up then goto the /etc/apache2/apache2.conf file and make the following changes

# These need to be set in /etc/apache2/envvars
# User ${APACHE_RUN_USER}
# Group ${APACHE_RUN_GROUP}
User www-data
Group www-data

Make an entry in the httpd.conf file at the following location

/etc/apache2/httpd.conf

and enter the LoadModule and other configuration data in this file

LoadModule weblogic_module /usr/lib/apache2/modules/mod_wl_22.so

<Location /medrec>
SetHandler weblogic-handler
WebLogicHost 127.0.1.1
WebLogicPort 7011
</Location>

There is an entry in the apache2.conf file to include the httpd.conf file, hence the changes of httpd.conf would get loaded

# Include all the user configurations:
Include /etc/apache2/httpd.conf

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)