Here is my servers /usr/local/centovacast/etc/web.d/cc-interface.conf file below.
# =============================================================================
#
# Centova Cast - Copyright 2010-2012, Centova Technologies Inc.
# Web Interface Configuration File
#
# =============================================================================
#
# WARNING:
# These settings normally should not need to be modified except as
# instructed by Centova Technologies.
#
# Problems caused as a result of modification of this file are not covered
# under your Centova Cast support agreement. Should you require technical
# support as a result of modifying this file, it will be billed at Centova
# Technologies' hourly professional services rate.
#
# tune FastCGI caching here:
# keys_zone=main:5M refers to a 5MB key cache size; increase for a larger keyspace
# inactive=10m indicates that cached data should be removed if not used within 10 minutes of being stored
# max_size=50M indicates a maximum total cache size of 50MB on disk; increase to allow more cache space
fastcgi_cache_path /usr/local/centovacast/var/webcache levels=1:2 keys_zone=main:5M inactive=10m max_size=50M;
upstream ccappsrv {
server unix:/usr/local/centovacast/var/run/cc-appserver.sock;
}
server {
# if you prefer to use an alternate port for your Centova Cast web interface, change
# the port number below, but make sure you update MASTER_PORT in etc/cc-control.conf too
#
# to bind to a specific interface, use ip:port (eg: listen 10.2.3.4:2199) and
# update MASTER_ADDR in etc/cc-control.conf as well.
listen 2199 default;
# if you prefer to use SSL, comment out the above "listen 2199 default;" line, uncomment the
# next three (3) lines, and save your SSL certificate and private key as certificate.pem and
# private.key, respectively, under /usr/local/centovacst/etc/ssl/
#listen 2199 default ssl;
#ssl_certificate /usr/local/centovacast/etc/ssl/certificate.pem
#ssl_certificate_key /usr/local/centovacast/etc/ssl/private.key
set $https off;
# you can specify the hostname for your web interface here, although it's usually not needed
server_name centovacast;
# if you wish to use start page urls in the format
http://username.yourdomain.com (instead of the
# standard
http://yourdomain.com/start/username) you can specify yourdomain.com here and configure
# wildcard dns for *.yourdomain.com to point to your Centova Cast web interface server's IP address
set $startpagedomain centovacast;
root /usr/local/centovacast/web;
# do not modify this; this is automatically overwritten (at startup) with the value
# of UPLOAD_SIZE_LIMIT in etc/centovacast.conf
client_max_body_size 116M;
error_page 404 /notfound.html;
error_page 500 502 503 504 /error.html;
fastcgi_cache_key $request_uri;
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
location /upload/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass
http://127.0.0.1:2197; proxy_redirect default;
}
location /internalcontentdist/ {
root /usr/local/centovacast/var/contentdist/;
rewrite ^/internalcontentdist/(.*)$ /$1 break;
return 403;
}
location ~ ^/static/resellers/(.*)/logofile.(.*)$ {
root /usr/local/centovacast/var/www/resellers/$1/;
try_files /logofile.png /logofile.gif /logofile.jpg @mainlogo;
}
location @mainlogo {
root /usr/local/centovacast/web;
rewrite ^ /theme/images/logo.png;
}
location /static/ {
expires 24h;
alias /usr/local/centovacast/var/www/;
}
# configure caching for start pages
location /start/ {
# request that browsers retain in cache for 24hr
expires 24h;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/start.php;
fastcgi_param SCRIPT_NAME /start.php;
fastcgi_param HTTPS $https;
fastcgi_cache main;
# regenerate server-side every 5 minutes (5m)
fastcgi_cache_valid 200 302 5m;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_pass ccappsrv;
}
# configure short tune-in links
location ~ ^/tunein(\.php)?/ {
# request that browsers retain in cache for 2min
expires 2m;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/tunein.php;
fastcgi_param SCRIPT_NAME /tunein.php;
fastcgi_param HTTPS $https;
fastcgi_cache main;
# regenerate server-side every 2 minutes (2m)
fastcgi_cache_valid 200 302 2m;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_pass ccappsrv;
}
# configure other short links
location ~ ^/(recentfeed|rpc)/ {
# request that browsers retain in cache for 2min
expires 2m;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root/external.php;
fastcgi_param SCRIPT_NAME /external.php;
fastcgi_param HTTPS $https;
fastcgi_cache main;
# regenerate server-side every 2 minutes (2m)
fastcgi_cache_valid 200 302 2m;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_pass ccappsrv;
}
# configure caching for external AJAX content (code snippet widgets, etc.)
# this content is mostly dynamic so we don't want to cache it for long, but
# in the event of a DDoS or Slashdot effect, this can mean the difference
# between regenerating only twice a minute, and regenerating dozens of times
# per second, thereby bringing down the server
location ~ ^/external/rpc.php$ {
# request that browsers retain in cache for 30sec
expires 15s;
include fastcgi.conf;
fastcgi_param HTTPS $https;
fastcgi_cache main;
# regenerate server-side every 15 seconds (15)
fastcgi_cache_valid 200 302 15s;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_pass ccappsrv;
}
# configure caching for mostly-static content
location /login/ {
expires 24h;
try_files $uri @notfound;
include fastcgi.conf;
fastcgi_param HTTPS $https;
fastcgi_cache main;
fastcgi_cache_valid 200 302 24h;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_pass ccappsrv;
}
# configure handling of all other locations (mostly JavaScript files, CSS stylesheets, images, etc.)
location / {
if ($http_host ~ ([^\.]+).([^:]+)(.*?)) {
set $subdomain $1;
set $basedomain $2;
}
if ($basedomain = $startpagedomain) {
rewrite ^/?$ /start/$subdomain last;
}
# mobile UI
rewrite ^/[mu](/.*)$ $1;
# deprecated/unused
rewrite ^/js.php.* /js.php last;
#DEV_ENCODED (developer use only)
#if (-f /usr/local/centovacast/dev/web/$uri) {
# rewrite ^ /dev/web/$uri last;
#}
# request that browsers retain in cache for 24hr
expires 24h;
index index.html index.php;
}
#DEV_ENCODED (developer use only)
#location /dev/web/ {
# root /usr/local/centovacast/;
#}
location @notfound {
return 404;
}
# configure handling of application files
location ~ \.php$ {
# mobile UI
rewrite ^/[mu](/.*)$ $1;
# request that browsers do not cache pure-dynamic content
expires -1;
try_files $uri @notfound;
include fastcgi.conf;
fastcgi_param HTTPS $https;
fastcgi_pass ccappsrv;
}
}