_ConfigureApacheHTTPServer

_InclusionsLibrary

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Step 2: Configure Apache HTTP Server

Apache uses something called Modules, these can be enabled or disabled and are essentially plugins that change the functionality of the server.

mod_proxy is an example of these modules, mod_proxy implements a proxy, gateway or cache for Apache while also allowing multiple virtual hosts on a single client.

Another option available is the use of mod_jk, this introduces the ability to forward requests to an application via the AJP protocol, for more details on this option please refer to the following documentation;

The preferred configuration is Proxying Atlassian server applications with Apache HTTP Server (mod_proxy_http). This works with any application server, and together with mod_proxy_html allows complex URL rewriting to deal with different application paths on the web server and the application server.

In addition, note that mod_jk and mod_jk2 are other commonly used AJP modules and not covered by this documentation.

More information

Apache Configuration file

It's important to note that Apache's default configuration varies significantly between various Linux distributions, Debian and Ubuntu distributions refer to Apache as 'Apache2' with the configuration files being stored in the /etc/apache2/ directory and named apache2.conf. Other distributions including CentOS and Fedora refer to Apache as 'httpd' with the configuration files stored in the /etc/httpd/ directory and the configuration file named httpd.conf. Windows  also follows the httpd.conf format.

Enable the Proxy modules

Now enable mod_proxy in Apache, and proxy requests to the application server by adding the example below to your Apache configuration file.

Debian/Ubuntu
Expand to see Debian/Ubuntu instructions
  1. Enable the module with the following:

    $ sudo a2enmod proxy_http
    Considering dependency proxy for proxy_http:
    Enabling module proxy.
    Enabling module proxy_http.
    To activate the new configuration, you need to run:
      service apache2 restart
  2. Restart Apache.
Windows/Other OS
Expand to see Windows/Other OS instructions
  1. Locate and edit the httpd.conf file, adding the below lines:

    LoadModule proxy_module modules/mod_proxy.so 
    LoadModule proxy_connect_module modules/mod_proxy_connect.so 
    LoadModule proxy_http_module modules/mod_proxy_http.so
  2. Restart Apache.

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.