CSP Configuration

From CacheWiki
Jump to: navigation, search

Multiple Cache Instances, One Apache Web Server

The docs are a bit vague about how to configure this scenario.

Here's a presciptive guide for how to configure Apache 2.2 on Windows to access multiple Cache instances using the virtual server technique.

Assumes you already have Apache 2.2 and the CSP Gateway installed on your Windows Web Server.

  • MachineW = Windows Web Server
  • Machine1 = First Cache Server running a Cache instance named Cache1
  • Machine2 = Second Cache Server running a Cache instance named Cache2

All the following instructions apply to MachineW, no changes are required to the configurations of Cache1 or Cache2. The instructions describe how to make the System Management Portal available. A similar approach should work for any CSP application.

CSP Gateway Configuration

  1. From your browser go to http://localhost/csp/bin/Systems/Module.cxw
  2. Select Server Access from the menu and add two servers:
    • Add a server named Cache1 with IP address of Machine1 and port number 1972 (or whatever Cache1's SuperServer port is)
    • Add a server named Cache2 with IP address of Machine2 and port number 1972 (or whatever Cache2's SuperServer port is)
  3. Select Application Access from the menu and add two applications:
    • Application path //Machine1Cache1/csp/sys with a default server of Cache1
    • Application path //Machine2Cache2/csp/sys with a default server of Cache2

Apache Virtual Server Configuration

  1. This step describes how to create local server names, if you have names that are registered with a DNS server then you can skip this bit. Edit c:\windows\system32\drivers\etc\hosts and add the following lines:
    • 127.0.0.1 Machine1Cache1
    • 127.0.0.1 Machine2Cache2
  2. Edit c:\Program Files\Apache Software Foundation\Apache 2.2\conf\httpd.conf and uncomment the line that says
    • #Include conf/extra/httpd-vhosts.conf
  3. Edit c:\Program Files\Apache Software Foundation\Apache 2.2\conf\extra\httpd-vhosts.conf and replace the whole file with:
<Directory C:\cachesys\csp>
 Order Deny,Allow
 Allow from all
</Directory>

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
  DocumentRoot C:\cachesys\csp
  ServerName Machine1Cache1
</VirtualHost>

<VirtualHost 127.0.0.1>
  DocumentRoot C:\cachesys\csp
  ServerName Machine2Cache2
</VirtualHost>

<VirtualHost 127.0.0.1>
  DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
  ServerName localhost
</VirtualHost>

Now you will need to Restart Apache.

Test by navigating to http://Machine1Cache1/csp/sys/UtilHome.csp - you should get the System Management Portal for that instance of Cache.

Personal tools