If you plan to use the Apache Web server with the privileged HTTP and HTTPS ports, 80 and 443 respectively, the Apache Web server must run as the root user.
You can download a copy of the Apache Web server from the Apache Web page.
Configuring the Apache Web server to run as root
Change the ownership of the httpd (Web server executable) and apachectl (the command to start and stop the server) to the root user.
Set the setuid file protection bit.
Change to the Apache-1_3/httpd/bin directory, and grant execute permissions on these files to the group that the “sybase” user is in:
chown root apachectl httpd chmod 4750 apachectl httpd
Now when you start the server, the setuid permission bit causes the Web server to run as root. Once Apache has successfully connected to the HTTP and HTTPS ports, it internally changes the value of userid to “nobody,” reducing security risks.
The UNIX dynamic loader (ld.so.1) does not search the LD_LIBRARY_PATH when a process is running as root. Therefore, to use the Security plug-in for Apache (mod_sybepsecure.so), copy the EAServer client library (libjcc.so) to /usr/lib:
cp $JAGUAR/client/lib/libjcc.so /usr/lib
Setting up the Apache Web server plug-in
Verify that you have installed the Web server components option before you complete this procedure.
Verify that the LD_LIBRARY_PATH environment settings contain:
JAGUAR/lib
libjcc.so
The primary shared library, which should be in a folder within the plug-in’s installation directory
Set JAGUAR_CLIENT_ROOT to $JAGUAR.
Set up the Apache Web server to load the plug-in:
Go to $SYBASE/Security/lib/.
Unjar plugins.jar.
Unjar Apache.jar.
Copy all .html files to the Apache Web server’s document root directory, htdocs.
Copy *.so to the libexec directory under the Apache installation.
Copy the sample plug-in configuration file SybSecurityPluginConfig.txt to $SYBASE, and edit it using the instructions in “Configuring the SybSecurityPluginConfig.txt file”.
Edit the Apache configuration file httpd.conf, and following this line:
#LoadModule foo_module libexec/mod_foo.so
Add the following lines:
LoadModule epsecure_module libexec/mod_sybepsecure.so AddType sec-login .com_sybase_ep_seclogin AddHandler epcontent-handler .com_sybase_ep_seclogin
Verify that EAServer and the security EJBs are running before you start Apache.
Start the Apache server. Change to the http directory of the Apache installation and enter:
bin/apachectl start
Configure other Web server plug-in properties in SybSecurityPluginConfig.txt, as necessary—see Table 11-1.