Operating System - HP-UX
1833873 Members
3116 Online
110063 Solutions
New Discussion

problem with apache's rotatelog

 
SOLVED
Go to solution
Dan Wick
New Member

problem with apache's rotatelog

I just installed the HP Web Suite v.2.0.8, then ran the altroot utility to put it in /opt/devhpws/ instead of the default /opt/hpws/. All works fine except for the rotatelogs in apache. Anyone know what I need to do to fix it?

In a virtual host container:
CustomLog "|/opt/devhpws/apache/bin/rotatelogs /var/logs/foo 86400" combined

Errors from the error_log (note that it's looking for the lib in the old hpws directory):
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library: /opt/hpws/apache/lib/libapr-0.sl.9
4 REPLIES 4
Geoff Wild
Honored Contributor
Solution

Re: problem with apache's rotatelog

Did you follow the doc on using altroot:

Q: How can I install HP-UX Web Server Suite into a different directory?
This assumes that you start Apache the standard way by using the "apachectl" script. You will need to become "root" user to do this.
Automatic method
A. Install the entire depot into /opt/hpws
B. Move it to the desired location by typing:
/opt/hpws/util/altroot.sh /opt/hpws /path_to_hpws
For help with this script type:
/opt/hpws/util/altroot.sh -h

Note: Prior to running this script, ensure that none of processes (like Apache, Tomcat, Webmin, Stunnel, rotatelogs, logresolv) are running.

C. Set shared library path.
Some Apache binaries such as htpasswd expect shared libraries to be in standard locations. To run them you will need to set the SHLIB_PATH.
Edit the file:
/path_to_hpws/apache/bin/apachectl
Replace all occurrences of:
/opt/hpws
With:
/path_to_hpws

Manual method
A. Install the entire depot in /opt/hpws

B. Move it to the desired location
cp -pr /opt/hpws /path_to_hpws

C. Set shared library path:
Some Apache binaries such as htpasswd expect shared libraries to be in standard locations. To run them you will need to set SHLIB_PATH in your environment.Also ensure that your automatic scripts (like /path_to_hpws/apache/bin/apachectl) are set right. All the occurences of /opt/hpws should have been replaced with /path_to_hpws

D. In start/stop control file:
/path_to_hpws/apache/bin/apachectl
Replace all occurrences of:
/opt/hpws
With:
/path_to_hpws
And define HTTPD with a different server root:
HTTPD="/path_to_hpws/apache/bin/httpd -d /path_to_hpws"
For example without this step Apache will try to access the old
/opt/hpws/apache/logs directory

E. In automatic startup file:
/etc/rc.config.d/hpws_apacheconf
Replace:
HPWS_APACHE_HOME=/opt/hpws/apache
With:
HPWS_APACHE_HOME=/path_to_hpws/apache

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dan Wick
New Member

Re: problem with apache's rotatelog

Geoff,

Thanks for the reply. I did follow the instructions on the altroot utility. The path is set correctly in apachectl (alt root changed it for me automatically). I've even sourced the envvars file that sets the SHLIB_PATH env. variable. That's what puzzle's me. I think it must be some environemental thing but can't see what.

Dan
Geoff Wild
Honored Contributor

Re: problem with apache's rotatelog

I'm thinking it has to do with rotatelogs...

Instead of setting absolute path,:

CustomLog "|/opt/devhpws/apache/bin/rotatelogs /var/logs/foo 86400" combined

Try:

CustomLog "|bin/rotatelogs /var/logs/foo 86400" combined

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dan Wick
New Member

Re: problem with apache's rotatelog

Thanks everyone for the help. HP has replicated my problem and should be working on a patch.