Thread: [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. |
|
From: Saikumar G. <sai...@gm...> - 2013-04-15 04:06:00
|
Also, I have included the fileserver in the config.js
"file_server" : {
"enable": true,
"document_root" : ".",
"alias" : [
{ "url" : "/images" , "path" : "/home/admin/dev/images" },
{ "url" : "/css" , "path" : "/home/admin/dev/css" }
]
}
|
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 12:08:14
|
Bump!. Its so sad that such an EXCELLENT Framework has no support from the user community. Anyway, I figured myself with this issue. For the benefit of others, I did the following. I stopped using lighttpd to forward all requests as a proxy server to cppcms app. Instead I forwarded only the path meant for cppcms as the documentation suggested. Which means, the default page of the root of domain which not be handled by the cppcms. Thanks Guys. |
|
From: Artyom B. <art...@ya...> - 2013-04-18 12:10:55
|
Such questions were asked quite lot over the list: In any case, there is a full manual about how to do what you need: http://cppcms.com/wikipp/en/page/run_application_web_server_root Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Saikumar Gandapodi <sai...@gm...> >To: cpp...@li... >Sent: Thursday, April 18, 2013 3:07 PM >Subject: Re: [Cppcms-users] Dispatcher and URL Mapping > > >Bump!. >Its so sad that such an EXCELLENT Framework has no support from the >user community. > >Anyway, I figured myself with this issue. > >For the benefit of others, I did the following. >I stopped using lighttpd to forward all requests as a proxy server to >cppcms app. >Instead I forwarded only the path meant for cppcms as the documentation >suggested. >Which means, the default page of the root of domain which not be handled >by the cppcms. > >Thanks Guys. > > > >------------------------------------------------------------------------------ >Precog is a next-generation analytics platform capable of advanced >analytics on semi-structured data. The platform includes APIs for building >apps and a phenomenal toolset for data science. Developers can use >our toolset for easy data analysis & visualization. Get a free account! >http://www2.precog.com/precogplatform/slashdotnewsletter >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 16:16:56
|
Before blaming the community one should read the documentation if I may say so. :-) On Thu, Apr 18, 2013 at 5:40 PM, Artyom Beilis <art...@ya...> wrote: > Such questions were asked quite lot over the list: > > In any case, there is a full manual about how to do what you need: > > http://cppcms.com/wikipp/en/page/run_application_web_server_root > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------ > *From:* Saikumar Gandapodi <sai...@gm...> > *To:* cpp...@li... > *Sent:* Thursday, April 18, 2013 3:07 PM > *Subject:* Re: [Cppcms-users] Dispatcher and URL Mapping > > Bump!. > Its so sad that such an EXCELLENT Framework has no support from the > user community. > > Anyway, I figured myself with this issue. > > For the benefit of others, I did the following. > I stopped using lighttpd to forward all requests as a proxy server to > cppcms app. > Instead I forwarded only the path meant for cppcms as the documentation > suggested. > Which means, the default page of the root of domain which not be handled > by the cppcms. > > Thanks Guys. > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- Best regards, Shiv Shankar Dayal |
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 16:50:32
|
Wow, I am taken aback by that statement. One should realize that not all documentations are perfect and people's comprehension on a subject might vary upon reading a document. I understand people have a busy life and all have priorities. But where were you guys when the question was posted ? If the question was that stupid, why dont you politely point us to the required document ? Is there anything wrong in that? Also where in the document does it explain that you cannot have the root of a domain assigned to a function. Maybe it did, but I could have missed it or didn't understand it. So instead of making comments like this you could have helped us out. The author and the commenter should understand that the success of an Open Source package lies on the fact on how well the community supports it. |
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 17:01:06
|
I understand your point. It is expected of a programmer to read the documentation. I could read the docs and convert the regexes for lightty to nginx. These are simple things. Before posting a question one must try and do research and post his research. As far as answering question is concerned I have not been using CppCMS for last six months and I do not check mail regularly. But since you said it is sad it hit me. Last point open source is bad term and it does not run by community. Hop over to libreprogramming.org and see logo and understand the logo to see why free software succeeds. It succeeds because of less than 1% people. Artyom being one of them. I am merely a user. I have nothing to take credit for even if I answer all questions. It is due to Artyom this project exists and will exist. Someday there will be another maintainer and it is because of that person the project succeeds. Patch senders contribution is nothing compared to core architect. And users are well users. For more information read "Free as in freedom". Learn the history. Artyom, I am sorry if I am discouraging a potential user in any sense. On Thu, Apr 18, 2013 at 10:20 PM, Saikumar Gandapodi <sai...@gm...>wrote: > Wow, I am taken aback by that statement. > > One should realize that not all documentations are perfect and people's > comprehension on a subject might vary upon reading a document. > > I understand people have a busy life and all have priorities. > But where were you guys when the question was posted ? > If the question was that stupid, why dont you politely point us to the > required document ? > Is there anything wrong in that? > > Also where in the document does it explain that you cannot have the root > of a > domain assigned to a function. > Maybe it did, but I could have missed it or didn't understand it. > So instead of making comments like this you could have helped us out. > > The author and the commenter should understand that the success of an > Open Source package lies on the fact on how well the community supports it. > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Best regards, Shiv Shankar Dayal |
|
From: Shiv S. D. <shi...@gm...> - 2013-04-18 17:03:17
|
And one more thing. I did not give a statement. It was a suggestion. To you. If you are taken back by suggestions then good luck learning new things. On Thu, Apr 18, 2013 at 10:30 PM, Shiv Shankar Dayal < shi...@gm...> wrote: > I understand your point. It is expected of a programmer to read the > documentation. > I could read the docs and convert the regexes for lightty to nginx. These > are simple > things. > > Before posting a question one must try and do research and post his > research. > > As far as answering question is concerned I have not been using CppCMS for > last > six months and I do not check mail regularly. But since you said it is sad > it hit me. > > Last point open source is bad term and it does not run by community. Hop > over to > libreprogramming.org and see logo and understand the logo to see why free > software > succeeds. It succeeds because of less than 1% people. Artyom being one of > them. > > I am merely a user. I have nothing to take credit for even if I answer all > questions. > It is due to Artyom this project exists and will exist. Someday there will > be another > maintainer and it is because of that person the project succeeds. > > Patch senders contribution is nothing compared to core architect. And > users are well > users. > > For more information read "Free as in freedom". Learn the history. > > Artyom, > > I am sorry if I am discouraging a potential user in any sense. > > > On Thu, Apr 18, 2013 at 10:20 PM, Saikumar Gandapodi <sai...@gm... > > wrote: > >> Wow, I am taken aback by that statement. >> >> One should realize that not all documentations are perfect and people's >> comprehension on a subject might vary upon reading a document. >> >> I understand people have a busy life and all have priorities. >> But where were you guys when the question was posted ? >> If the question was that stupid, why dont you politely point us to the >> required document ? >> Is there anything wrong in that? >> >> Also where in the document does it explain that you cannot have the root >> of a >> domain assigned to a function. >> Maybe it did, but I could have missed it or didn't understand it. >> So instead of making comments like this you could have helped us out. >> >> The author and the commenter should understand that the success of an >> Open Source package lies on the fact on how well the community supports >> it. >> >> >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > -- > Best regards, > Shiv Shankar Dayal > -- Best regards, Shiv Shankar Dayal |
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 18:21:30
|
Its quite apparent that you didn't understand a word I said earlier and it seems that you are in good mood to have an argument without taking anything into your mind. Anyway. Thanks a lot and don't bother replying by wasting your time unless you have something to contribute to help others. |
|
From: Artyom B. <art...@ya...> - 2013-04-18 18:43:28
|
Please guys stop... Both you are right and wrong... @Saikumar Gndapodi: please try to search for the answer next time in docs or in the list (this is a common issue) @Shiv Shankar Dayal: I would really expect that after that long time, other users would be able to answer or point to the answer for such a common question. It is not ok that I'm the only person helping others around. And finally try to be respectful to other list members even if you disagree. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Saikumar Gandapodi <sai...@gm...> >To: cpp...@li... >Sent: Thursday, April 18, 2013 9:21 PM >Subject: Re: [Cppcms-users] Dispatcher and URL Mapping > > >Its quite apparent that you didn't understand a word I said earlier and >it seems that you are in good mood to have an argument without taking >anything into your mind. >Anyway. Thanks a lot and don't bother replying by wasting your time unless >you have something to contribute to help others. > > > >------------------------------------------------------------------------------ >Precog is a next-generation analytics platform capable of advanced >analytics on semi-structured data. The platform includes APIs for building >apps and a phenomenal toolset for data science. Developers can use >our toolset for easy data analysis & visualization. Get a free account! >http://www2.precog.com/precogplatform/slashdotnewsletter >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
|
From: Saikumar G. <sai...@gm...> - 2013-04-18 19:03:50
|
Artyom, Thanks for your moderation. Point noted. Will check the docs/list before reaching out. Excellent Framework. Great work ! Thanks. |