---
title: Installing the Apache module
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/apache-module/installing-the-apache-module
---

Our Apache module is distributed in binary form as an Apache shared module.

## Compatibility and requirements

Our Apache module requires the following:

### Alpine

- Apache 2.2 or 2.4
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

### Amazon Linux

- Amazon Linux 2 or Amazon Linux 2023
- Apache 2.2 or 2.4
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

### Debian

- Apache 2.2 or 2.4
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

### Red Hat

- Apache 2.2 or 2.4
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

### Ubuntu

- Apache 2.2 or 2.4
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

### Windows

- Windows 10, Windows Server 2016, or higher (64-bit)
- Apache 2.4 (64-bit)
- The Next-Gen WAF agent must be [installed](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent#installing-the-agent).

## Installing the Apache module

To install the apache module, complete the steps from the tab that matches your operating system:

### Alpine

1. Install the Apache module.

   ```term
   $ sudo apk add sigsci-module-apache
   ```

2. If `mod_signalsciences.conf` is not present under `/etc/apache2/conf.d/*.conf` in your Apache configuration file (`apache2.conf` or `httpd.conf`), enable the Next-Gen WAF module by adding the following line to the file after the **Dynamic Shared Object (DSO) Support** section.

   ```term
   LoadModule signalsciences_module modules/mod_signalsciences.so
   ```

3. Restart the Apache web service.

   ```term
   $ sudo rc-service apache2 restart
   ```

4. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

### Amazon Linux

1. Install the Next-Gen WAF Apache module:

   ```term copy
   $ sudo yum install sigsci-module-apache
   ```

2. Add the following line to your Apache configuration file (`apache2.conf` or `httpd.conf`) after the **Dynamic Shared Object (DSO) Support** section to enable the Next-Gen WAF Apache module:

   ```text
   LoadModule signalsciences_module /etc/httpd/modules/mod_signalsciences.so
   ```

3. Restart the Apache web service:

   ```term copy
   $ sudo systemctl restart httpd
   ```

4. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

### Debian

1. Install the Apache module.

   ```term copy
   $ sudo apt-get install sigsci-module-apache
   ```

2. Enable the Apache module.

   ```term copy
   $ sudo a2enmod signalsciences
   ```

   If `a2enmod` is not available, add the following line to your Apache configuration file (`apache2.conf` or `httpd.conf`) after the **Dynamic Shared Object (DSO) Support** section:

   ```text
   LoadModule signalsciences_module /usr/lib/apache2/modules/mod_signalsciences.so
   ```

3. Restart the Apache web service.

   ```term copy
   $ sudo service apache2 restart
   ```

4. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

### Red Hat

1. Install the Next-Gen WAF Apache module.

   ```term copy
   $ sudo yum install sigsci-module-apache
   ```

2. Add the following line to your Apache configuration file (`apache2.conf` or `httpd.conf`) after the **Dynamic Shared Object (DSO) Support** section to enable the Next-Gen WAF Apache module:

   ```text
   LoadModule signalsciences_module /etc/httpd/modules/mod_signalsciences.so
   ```

3. Restart the Apache web service.

   ```term copy
   $ sudo systemctl restart httpd
   ```

4. If Apache fails to restart because it cannot locate `mod_signalsciences.so`, change the LoadModules line in `httpd.conf` to reflect the correct location on the target system.

   The default install location for the module is `/etc/httpd/modules` but some systems may have Apache loading it's config from a non-standard directory. When this happens, the `yum` installer will not install `mod_signalsciences.so` to `/etc/httpd/modules` but instead to the following path:

   `/usr/lib64/httpd/modules/mod_signalsciences.so`

5. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

### Ubuntu

1. Install the Next-Gen WAF Apache module.

   ```term copy
   $ sudo apt-get install sigsci-module-apache
   ```

2. Enable the Apache module.

   ```term copy
   $ sudo a2enmod signalsciences
   ```

   If `a2enmod` is not available, add the following line to your Apache configuration file (`apache2.conf` or `httpd.conf`) after the **Dynamic Shared Object (DSO) Support** section:

   ```text
   LoadModule signalsciences_module /usr/lib/apache2/modules/mod_signalsciences.so
   ```

3. Restart the Apache web service.

   ```term copy
   $ sudo service apache2 restart
   ```

4. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

### Windows

1. Click one of the following links to download the latest version of our Apache module:

   - [https://dl.security.fastly.com](https://dl.security.fastly.com/sigsci-module-apache/sigsci-module-apache_latest.zip)
   - [https://dl.signalsciences.net](https://dl.signalsciences.net/sigsci-module-apache/sigsci-module-apache_latest.zip)

2. Extract the Next-Gen WAF Apache module from the `.zip` archive to your Apache modules directory, replacing `PATH-TO-APACHE` with the path to your Apache installation:

   ```term copy nolinenums
   $ unzip sigsci-module-apache_latest.zip
   $ copy mod_sigsci.so PATH-TO-APACHE\modules\
   ```

3. Add the following line to your Apache configuration file (`httpd.conf`) after the **Dynamic Shared Object (DSO) Support** section to enable the Next-Gen WAF Apache module:

   ```text
   LoadModule signalsciences_module modules/mod_sigsci.so
   ```

4. Determine `SigSciAgentPort` and `SigSciAgentHost` values. These module configuration values must reflect either:

   - The `rpc-address` value from the agent configuration (if used).
   - The default port of the agent's RPC listener (737)

   For example, if no `rpc-address` is being set within the agent configuration, update `SigSciAgentPort` to `737`:

   ```term copy nolinenums
   SigSciAgentPort 737
   ```

   If the agent has an `rpc-address` value configured of `192.231.203.132:9000`, then configure the module to reflect it:

   ```term copy nolinenums
   SigSciAgentPort 9000
   SigSciAgentHost 192.231.203.132
   ```

   These properties can be changed globally, or per VirtualHost if necessary. Check out the [Module configuration guide](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/module-config#apache) for further information.

5. Test to confirm the configuration is correct, replacing `MY-SERVICE-NAME` with the name of your service:

   ```term copy
   $ httpd.exe -n "MY-SERVICE-NAME" -t
   ```

6. Start the Apache service as normal, for example:

   ```term copy
   $ net start Apache2.4
   ```

   Or restart the Apache service with the following example command, replacing `MY-SERVICE-NAME` with the name of your service:

   ```term copy
   $ httpd.exe -k restart -n "MY-SERVICE-NAME"
   ```

7. [Verify](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment#verifying-your-installation) the agent and module installation.

## Next steps

After you've installed the Apache module, you can explore different [module options](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/module-config/#apache).

## Related content

- [About module-agent deployment](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment)
- [Using an API with the Next-Gen WAF](https://www.fastly.com/documentation/guides/next-gen-waf/developer/using-an-api-with-the-next-gen-waf)
