[Cppcms-users] Dispatcher and URL Mapping
Brought to you by:
artyom-beilis
|
From: Saikumar G. <sai...@gm...> - 2013-04-15 02:50:14
|
I don't seem to get this working. Can someone please help me with this ? I trying to map the following paths to methods. I can get to the default "/" rootpage() only, however the login and auth page is not accessible. Getting a 404 error for these two pages. www.domain.com -> rootpage() www.domain.com/login -> loginpage() www.domain.com/auth -> authpage() for this I made the following in the config.js and in the code { "service" : { "api" : "http", "port" : 8080 }, "http" : { "script" : "/" } } { dispatcher().assign("/auth", &server::authpage, this); mapper().assign("auth", "/auth"); dispatcher().assign("/login", &server::loginpage, this); mapper().assign("login", "/login"); dispatcher().assign("", &server::rootpage, this); mapper().assign(""); mapper().root(""); } I am running lighttpd as a proxy server connecting to the cppcms app as http. lighttpd: $HTTP["host"] =~ "(www.domain.com)" { proxy.server = ("" => ( ("host" => "127.0.0.1", "port" => 8080) )) What am I missing ? Thanks. |