You are here: Configuring Server Connections > Direct Server Return (DSR) > Configuring Servers for Direct Server Return > Configuring a Linux System running Apache for DSR

Configuring a Linux System running Apache for DSR

This is an example of how to configure a typical Linux system running Apache 2.0 for DSR:

  1. Log into the Linux server as root, and enter the following command to configure a loopback interface:

# ifconfig lo:dsr inet cluster-ip netmask 255.255.255.255

Substitute the IP address of the DSR-enabled cluster on FortiADC for cluster-ip in the command above. Note that in most Linux distributions, you are configuring an alias for the loopback interface and should specify a netmask of 255.255.255.255 instead of the netmask used to configure the cluster on FortiADC.

  1. Enter the following command to verify that the loopback alias was created:

# ifconfig lo:dsr

The output should look like this:

lo:dsr Link encap:Local Loopback

inet addr:cluster-ip Mask:255.255.255.255

UP LOOPBACK RUNNING MTU:16436 Metric:1

  1. To configure an Apache 2.0 server for DSR, edit the server configuration file to add a Listen directive for the cluster IP (on many systems, the configuration file is found at /usr/local/etc/apache/httpd.conf). Look for the first line beginning with the Listen directive, and add another line that looks like this:

Listen cluster-ip

Where cluster-ip is the DSR-enabled cluster IP. Save your changes to the file.

  1. Reboot the Apache server:

# apachectl restart

You should now be able to send client requests to the cluster IP and port, and get responses directly from the Apache server running on Linux. Remember that static routes on your servers may be necessary, depending on your network configuration.