Chapter 22 WAN Optimization, Web Cache, Explicit Proxy, and WCCP for FortiOS 5.0 : Web caching and SSL offloading : Example: Web caching of HTTP and HTTPS Internet content for users on an internal network : Configuration Steps - CLI
  
Configuration Steps - CLI
Use the following steps to configure the example configuration from the FortiGate CLI.
To add HTTP and HTTPS web caching to a security policy
1. Enter the following command to add a security policy that allows all users on the internal network to access the Internet and that includes web caching of HTTP and HTTPS traffic.
config firewall policy
edit 0
set srcintf internal
set srcaddr all
set dstintf wan1
set distinf all
set schedule always
set service ANY
set action accept
set nat enable
set webcache enable
set webcache-https any
end
To cache HTTP traffic on port 80 and 8080 and HTTPS traffic on ports 443 and 8443
1. Enter the following command to edit the default proxy options profile to configure it to look for HTTP traffic on ports 80 and 8080 and to look for HTTPS traffic on ports 443 and 8443:
config firewall profile-protocol-options
edit default
config http
set status enable
set ports 80 8080
end
config https
set status enable
set ports 443 8443
end
end
2. Enter the following command to add the protocol options profile to the security policy:
config firewall policy
edit 1
set utm-status enable
set profile-protocol-options default
end