Media Flow Controller Configuration Tasks : How To : Configure Media Flow Controller to Cache All Contents for a Website

Configure Media Flow Controller to Cache All Contents for a Website
Configure Media Flow Controller to cache all contents of the Website www.example.com.
1.
Install Media Flow Controller and set up basic network connectivity including eth0 IP address, a domain list (to resolve unqualified hostnames), DNS, and default gateway; save configurations.
interface eth0 ip address <IP_address> {<netmask> | <mask_length>}
hostname <name>
ip domain-list <domain_name_for_resolving_hostnames> ...
ip name-server <IP_address>
ip default-gateway <IP_address>
write memory
2.
ping <default_gateway>
Ctrl+c
ping <origin_server_FQDN>
Ctrl+c
3.
Set up DNS records so that incoming requests are routed to Media Flow Controller. Be sure to set the Media Flow Controller DNS server so it is not the same as your Web server’s DNS server (to prevent looping).
4.
Configure a namespace with domain www.example.com and match uri-prefix / (slash):
test-vos (config) # namespace example
test-vos (config namespace example) # domain www.example.com
test-vos (config namespace example) # match uri /
test-vos (config namespace example) # origin-server http www.exampleOS.com
test-vos (config namespace example) # status active
test-vos (config namespace example) # exit
The match uri-prefix of just a / (slash) tells Media Flow Controller to use these namespace rules for all incoming requests to domain www.example.com, since all incoming requests have a / (slash) in them. To limit the application of these namespace rules, you would change the match uri-prefix to narrow down which requests to that domain trigger this namespace and/or set a precedence following the match criteria (the lower the number, the higher the precedence) for resolving conflicts; a uri-prefix of just a / (slash) would typically have a low precedence value set so other namespaces (which will all include a /) can be used.
Tip! If unsure what port you are using for origin-server, use standard Linux shell commands to figure out the port, and then configure it along with the origin-server, if not the default. If you need to change the origin-server, or any namespace setting, simply enter the new setting.
Note! There are many namespace options, including cache-inherit, delivery protocol, origin-fetch, and so forth. See “Namespace Options” on page 79 for more information and namespace for CLI details.
5.
Repeat the configuration twice, if needed, to cover requests coming in to “example.com” (without the “www” prefix) and/or the IP address for example.com (if requests may come in that way).
6.
show namespace example
Namespace: example
Active: yes
Precedence: 0
Domain Name: www.example.com
Proxy Mode: reverse
Match Type:
URI-Prefix - /
Origin-Server: http://www.exampleOS.com:80
Delivery Protocol: HTTP Status Enabled: yes
Origin Fetch Configuration:
Cache-Age (Default): 28800 (seconds)
Cache Age Threshold: 60 (seconds)
Cache-Directive: follow
Object Size Threshold: NONE (Always Cached)
Modify Date Header: deny
Origin Request Configuration:
Cache-Revalidate: permit
Use 'Date' Header when Last-Modified is not present: no
Convert HEAD to GET: permit
Host-header Inherit: deny
Set X-Forwaded-For Header : yes
Client-Request Configuration:
Allow objects with a query-string to be cached: no
Client-Response Configuration :
Delivery Protocol: RTSP Status Enabled: no
Origin Fetch Configuration:
Cache-Age (Default): 28800 (seconds)
Cache Age Threshold: 60 (seconds)
Cache-Directive: follow
Object Size Threshold: NONE (Always Cached)
Virtual Player:
Live Pub-Point Details:
Pre-stage FTP Configuration:
User: example_ftpuser
7.
From the browser, initiate a connection to Media Flow Controller for www.example.com. Check the accesslog to see that Media Flow Controller processed it. You can view the errorlog and the accesslog via the Media Flow Controller Management Console; use a browser to open the Media Flow Controller IP address on port 8080 and login (default login: admin / no password) and open the Service Logs tab.

Report an Error
Media Flow Controller Administrator's Guide and CLI Command Reference
Copyright © 2010 Juniper Networks, Inc.