// CppCMS Configuration file
// Extended JSON format, "//" like comments are allowed

{
	"id" : 1,
	// Service description
	"service" : {
//		"worker_processes" : 5,
		"worker_threads" : 5,
		"api" : "http",
		"port" : 8080,
	//	"ip" : "0.0.0.0"
		"ip" : "127.0.0.1",
		// "socket" : "/tmp/scgi.socket"
		"nodes" : [
			{
				"id" : 1,
				"ip" : "127.0.0.1",
				"control_ports" : [ 8031 ] // one per forked process
			},
			{
				"id" : 2,
				"ip" : "127.0.0.1",
				"control_ports" : [ 8032 ]  //
			}
		]
	},
	"http" : {
		"proxy" : {
			"behind" : true,
			"remote_addr_headers" : 
				[ 
			 		"X-Real-IP", // Nginx One
					"X-Forwarded-For" // Standard One
				]
		},
		"script_names" : [ "/stock", "/hello" , "/chat" ]
		//"script" : "/hello"
	},
	"gzip" : {
		"enable" : true, // Default true
		//"enable" : false, // Default true
		// "level" : 1,
		// "buffer" : 4096
	},
	"localization" : {
		"encoding" : "UTF-8",
		"messages" : {
			"paths" : [ "./transtext/locale" ],
			"domains" : [ "test", "app" ]
		},
		"locales" : [ "he_IL", "en_US", "he_IL@calendar=hebrew" ],
		"disable_charset_in_content_type" : false	// Disable 
	},
	"session" : {
		"expire" : "browser",
		"timeout" : 10, // seconds
		"cookies" : {
			"prefix" : "cppcms_session",
			"domain" : "",
			"path" : "/",
			"secure" : false
		},
		"location" : "both",
		"client_size_limit" : 64,
		"gc" : 10,
		"client" : { 
			"encryptor" : "hmac", 
			// aes or hmac -- hmac -- signature only, aes -- encryption and signature
			"key" : "261965ba80a79c034c9ae366a19a2627"
			// 32 digit hexadecimal secret number
		},
		"server" : {
			"storage" : "files",
			"dir" : "./cppcms_sessions",
			"shared" : true
		}
		
	},
	"views" : {
		"default_skin" : "skin1",
		 "paths" : [ "./" ],
		 //"skins" : [ "skin3" ],
		 //"auto_reload" : true
	},
	"cache" : {
		"backend" : "thread_shared",
		"limit" : 100, // items
		"memsize" : 64,  // KBs
	},
	"file_server" : {
		"enable" : true,
		"doument_root" : "."
		// "mime_types" : "mime.type"
	}
	
}
