| Summary: Use the steps in this article to connect Apache Web Server to the DocuShare Tomcat servlet with mod_jk. Follow the section that matches your Linux distribution, then restart Apache and confirm that DocuShare opens through the Apache URL. |
Before You Begin
Before starting, confirm that Apache Web Server is already installed on the server where you want to publish DocuShare. You should also know the DocuShare installation path that will replace {dshome} in the examples below.
- Use the RHEL or CentOS procedure if your Apache installation uses the /etc/httpd layout.
- Use the Ubuntu 22.04 procedure if your Apache installation uses the /etc/apache2 layout.
- If you are publishing DocuShare over HTTPS, complete the HTTPS steps for your platform after the basic HTTP bridge is in place.
| How to use this article: Each platform section below has its own numbered steps. Start with the section that matches your Linux distribution. Do not mix the RHEL/CentOS file paths with the Ubuntu file paths. |
Locate the DocuShare Bridge Files
DocuShare installs the Apache bridge files listed below. You will reference these files while completing the Apache configuration.
- {dshome}/tomcat/bin/native/apache2.4/mod_jk.so
- {dshome}/tomcat/conf/jk/workers.properties
- {dshome}/tomcat/conf/jk/apache2.4/httpd.conf
Bridge Directives to Add
The file {dshome}/tomcat/conf/jk/apache2.4/httpd.conf contains the Apache bridge directives required by DocuShare. If you need to review the content before copying it into Apache, it is equivalent to the following:
| <IfModule !mod_jk.c> LoadModule jk_module "{dshome}/tomcat/bin/native/apache2.4/mod_jk.so" </IfModule> JkWorkersFile "{dshome}/tomcat/conf/jk/workers.properties" JkLogFile "{dshome}/tomcat/logs/mod_jk.log" JkLogLevel emerg JkMount /docushare ajp13 JkMount /docushare/* ajp13 |
RHEL or CentOS Instructions
Use this section only if your Apache installation uses the /etc/httpd layout.
RHEL or CentOS HTTP Setup
Step 1. Open the Apache main configuration file for editing. In most environments this file is /etc/httpd/conf/httpd.conf.
Step 2. Open the DocuShare bridge file at {dshome}/tomcat/conf/jk/apache2.4/httpd.conf and copy its contents.
Step 3. Paste those directives into /etc/httpd/conf/httpd.conf, or into another Apache configuration file that is included by your Apache installation.
Step 4. Save the Apache configuration changes.
Step 5. Run the Apache configuration test.
| sudo apachectl configtest |
Step 6. If the configuration test passes, restart Apache.
| sudo systemctl restart httpd |
RHEL or CentOS HTTPS Setup
Complete this section only if customers will access DocuShare through HTTPS.
Step 1. Open /etc/httpd/conf.d/ssl.conf.
Step 2. Place the JkMount lines inside the VirtualHost block that handles SSL traffic.
Step 3. Save the SSL configuration changes.
Step 4. Run the Apache configuration test again.
| sudo apachectl configtest |
Step 5. If the configuration test passes, restart Apache.
| sudo systemctl restart httpd |
Ubuntu 22.04 Instructions
Ubuntu uses the /etc/apache2 configuration layout. Do not look for /etc/httpd/conf/httpd.conf on Ubuntu, because that file does not exist on a standard Ubuntu Apache installation.
Ubuntu 22.04 HTTP Setup
Step 1. Create the file /etc/apache2/conf-available/docushare-jk.conf.
Step 2. Open the DocuShare bridge file at {dshome}/tomcat/conf/jk/apache2.4/httpd.conf and copy its contents into /etc/apache2/conf-available/docushare-jk.conf.
Step 3. Enable the Apache configuration file you just created.
| sudo a2enconf docushare-jk |
| Note: On Ubuntu, Apache runs as www-data. If {dshome}/tomcat/logs is not writable by that account, the mod_jk bridge may not start cleanly. If needed, update permissions on the DocuShare Tomcat logs path before restarting Apache. |
Step 4. Run the Apache configuration test.
| sudo apachectl configtest |
Step 5. If the configuration test passes, restart Apache.
| sudo systemctl restart apache2 |
Ubuntu 22.04 HTTPS Setup
If customers will access DocuShare through HTTPS, complete the HTTP setup above first and then continue with these SSL steps.
Step 1. Enable the Apache SSL module and the default SSL site.
| sudo a2enmod ssl sudo a2ensite default-ssl |
Step 2. Open /etc/apache2/sites-available/default-ssl.conf and place the JkMount directives inside the VirtualHost block that handles HTTPS traffic.
Step 3. Save the SSL configuration changes.
Step 4. Run the Apache configuration test again.
| sudo apachectl configtest |
Step 5. If the configuration test passes, restart Apache.
| sudo systemctl restart apache2 |
If Apache Cannot Load mod_jk.so
| Important: Verify that the LoadModule jk_module line points to {dshome}/tomcat/bin/native/apache2.4/mod_jk.so. If Apache cannot load the module from that path, copy mod_jk.so into /usr/lib/apache2/modules/ and update the LoadModule line to match the actual module location used by your Apache installation. If the shipped binary still does not load on your Ubuntu Apache build, install the distribution package with sudo apt-get install libapache2-mod-jk and then update the LoadModule line to use the installed module path. |
Confirm the Bridge Is Working
Step 1. Open the Apache URL that should front-end DocuShare and confirm that the /docushare path loads successfully.
Step 2. If you enabled HTTPS, browse to the HTTPS URL and confirm that DocuShare opens through port 443.
Step 3. If the site does not load, recheck the Apache file locations for your platform, confirm that the JkMount lines were added in the correct location, and rerun sudo apachectl configtest.