Sei sulla pagina 1di 13
Configuring Content Switching Feature
Configuring Content Switching Feature

Configuring the Content Switching Feature on the NetScaler Appliance to Access Multiple Web Sites Hosted on a Web Server

To configure the Content Switching feature on the NetScaler appliance to access multiple Web sites hosted on a Web server, complete the following procedures:

Configuring the Content Switching Feature on the NetScaler Appliance

Configuring the IIS Server

Configuring the Apache W eb Server

Page 1

Configuring the Content Switching Feature on the NetScaler Appliance

To configure the Content Switching feature on the NetScaler appliance, complete the following procedure:

1. To add DNS address record entries on the appliance pointing to the IP addresses of the backend Web servers, complete the following sub-procedure:

1. Expand the DNS node.

2. Expand the Records node.

3. Select the Address Records node.

4. Click Add.

5. Type the host name in the Host Name field.

6. Type the IP address, as shown in the following screen shot:

. 5. Type the host name in the Host Name field. 6. Type the IP address,

7.

Click Create.

2. To add Load Balancing Servers with the IP Address/Domain Name field set to the hostname of the DNS records you have created, complete the following sub-procedure:

1. Expand the Load Balancing node.

2. Select the Servers node.

3. Click Add.

4. Type the server name in the Server Name field, as shown in the following screen shot.

Server Name field, as shown in the following screen shot. 5. Click OK . 3. To

5. Click OK.

3. To create Load Balancing Services configured to point to the new Servers, complete the following sub-procedure:

1. Expand the Load Balancing node.

2. Select the Services node.

3. Click Add.

4. Configure the service, as shown in the following screen shot.

5. Click Create . 4. To create Load Balancing Virtual Servers (VServers) that are directly

5. Click Create.

4. To create Load Balancing Virtual Servers (VServers) that are directly addressable, complete the following sub- procedure:

1. Expand the Load Balancing node.

2. Select the Virtual Servers node.

3. Click Add.

4. Configure the VServer, as required. Ensure that you select the Directly Addressable option, as shown in the following screen shot.

Ensure that you select the Directly Addressable option, as shown in the following screen shot. 5.

5. Click Create.

5.

To create Content Switching policies for each URL, complete the following sub-procedure:

1. Expand the Content Switching node.

2. Select the Policies node.

3. Click Add.

4. Enter the required expression. The following screen shot displays a sample expression for your reference:

screen shot displays a sample expression for your reference: 6. To create a Content Switching VServer,

6. To create a Content Switching VServer, such that one Virtual IP address can access both Web sites, complete the following sub-procedure:

1. Expand the Content Switching node.

2. Select the Virtual Servers node.

3. Click Add.

4. Select the Policies tab.

5. Click CSW, shown in the following screen shot.

6. Bind the required policy. 7. Click Create . Page 7

6. Bind the required policy.

7. Click Create.

To configure the Content Switching VServer, similar to the one configured in the preceding procedure, from the command line interface of the appliance, run the following commands:

add dns addRec Example 192.168.168.168 add server Example Example add service Example1_svc Example HTTP 80 -gslb NONE -maxClient 0 -maxReq 0 -cip DISABLED -usip NO - useproxyport YES -sp OFF -cltTimeout 180 -svrTimeout 360 -CKA NO -TCPB NO -CMP NO add lb vserver lb_vserver1 HTTP 0.0.0.0 0 -persistenceType NONE -cltTimeout 180 bind lb vserver lb_vserver1 Example1_svc add cs policy csw_pol_portal1 -rule “HTTP.REQ.HOSTNAME.EQ(\“portal1.example.com\”)” add cs vserver csw_vserv HTTP 192.168.168.170 80 -cltTimeout 180 bind cs vserver csw_vserv lb_vserver1 -policyName csw_pol_portal1 -priority 100 bind cs vserver csw_vserv lb_vserver2 -policyName csw_pol_portal2 -priority 120

[Top]

Configuring IIS Server

To configure IIS server, complete any of the following procedures, as required:

Configuring IIS 6.0

Configuring IIS 7.5

Configuring IIS 6.0 To configure the IIS 6.0 server, complete the following procedure:

1. Open IIS Administration Microsoft Management Console (MMC).

2. Expand the Web Sites node.

3. Right-click the Default Web Site node.

4. Select Properties from the shortcut menu.

5. Click Advanced, as shown in the following screen shot:

6. Select the IP address and click Edit , as shown in the following screen

6. Select the IP address and click Edit, as shown in the following screen shot:

7. Type the Host Header Fully Qualified Domain Name (FQDN), such as portal1.example.com, as shown

7. Type the Host Header Fully Qualified Domain Name (FQDN), such as portal1.example.com, as shown in the following screen shot:

8. Click OK . 9. Repeat Step 1 through Step 8 for each Web site

8. Click OK.

9. Repeat Step 1 through Step 8 for each Web site you need to add to the setup.

Configuring IIS 7.5 To configure the IIS server 7.5, complete the following procedure:

1. Open IIS Administration MMC.

2. In the Connections pane, expand the Web Sites node.

3. Select the Web site you want to modify.

4. In the Actions pane, click the Bindings link to display the Site Binding dialog box, as shown in the following screen shot:

5. Click Edit . 6. Enter the Host Header FQDN, such as portal1.example.com, as shown

5. Click Edit.

6. Enter the Host Header FQDN, such as portal1.example.com, as shown in the following screen shot.

portal1.example.com, as shown in the following screen shot. 7. Click OK . 8. Repeat Step 1

7. Click OK.

8. Repeat Step 1 through Step 6 for each Web site you need to add to the setup.

[Top]

Configuring Apache Web Server

To configure the Apache web server, complete the following procedur e:

1. Stop the Apache Service.

2. Edit the Apache httpd.conf file.

3. Add the following entries to the file:

NameVirtualHost *:80

<VirtualHost *:80>

ServerName portal1.example.com #ServerAlias example.tld *.example.tld DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/portal1"

</VirtualHost>

<VirtualHost *:80>

ServerName portal2.example.com DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/portal2"

</VirtualHost>

4. Start the Apache Service.