
Hybrid Cloud Application Architecture
F5
®
Deployment Guide 62
2. Click the Create button.
The New iRule screen opens.
3. In the Name box, enter a name for your iRule.
In our example, we use Tomcat-httptohttps.
4. In the Definition section, copy and paste the following iRule:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
5. Click the Finished button
Modifying the HTTP virtual server
The next task is to modify the HTTP virtual server you created in Creating
the virtual server, on page 1-17 to use the iRule you just created.
To modify the existing Tomcat virtual server
1. On the Main tab, expand Local Traffic, and then click Virtual
Servers. The Virtual Servers screen opens.
2. From the Virtual Server list, click the Apache virtual server you
created in the
Creating the virtual server section.
In our example, we click Tomcat-bookstore-vs.
3. On the menu bar, click Resources.
4. From the Default Pool list, select None.
This virtual server no longer requires the load balancing pool, as
traffic is redirected to the HTTPS virtual server we create in the
following procedure.
5. Click the Update button.
6. In the iRules section, click the Manage button.
The Resource Management screen opens.
7. From the Available list, select the iRule you created in the Creating
the Redirect iRule section, and click the Add (<<) button.
In our example, we select Tomcat-httptohttps.
8. Click the Finished button.
Creating the HTTPS virtual server
The final task in this section is to create a HTTPS virtual server.
To create a new HTTPS virtual server
1. On the Main tab, expand Local Traffic, and then click Virtual
Servers. The Virtual Servers screen opens.
2. Click the Create button.
Comentários a estes Manuais