Thread: Re: [Cppcms-users] Attempting to run cppcms at webroot
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2011-09-01 07:06:28
|
Then your probably need this: The option url.rewrite-[repeat-]if-not-file or Or probably use rules like url.rewrite-once = ( "^/media/" => "$0", "^/(.*)" => "/my.fcgi/$1" ) See: http://redmine.lighttpd.net/wiki/1/Docs:ModRewrite Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ --- On Thu, 9/1/11, David Elrom <dav...@gm...> wrote: From: David Elrom <dav...@gm...> Subject: Re: [Cppcms-users] Attempting to run cppcms at webroot To: cpp...@li... Date: Thursday, September 1, 2011, 4:18 AM i was going to use lighttpd. On Wed, Aug 31, 2011 at 3:40 AM, augustin <aug...@ov...> wrote: On Wednesday, August 31, 2011 01:28:12 PM Artyom Beilis wrote: > So you need to do apply some URL rewriting rules such that path > "/something" would map to lets say "/blog.cgi/something" where "/blog.cgi" > is the FastCGI script name. I am not Allan, but that's what I did, too. David doesn't say which web server he uses. mod_rewrite with apache2 works like a charm. .htaccess: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ my_app.cgi/$1 [L,QSA] </IfModule> Of course, Apache2 must be properly configured to allow .htaccess override of mod_rewrite. David: this is likely to become a FAQ (literally): can you add a new page about this somewhere in the wiki? Blessings, Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2011-09-01 09:06:46
|
> From: Artyom Beilis <art...@ya...> > Subject: Re: [Cppcms-users] Attempting to run cppcms at webroot > To: cpp...@li... > Date: Thursday, September 1, 2011, 10:06 AM > Then your probably need this: > > The option url.rewrite-[repeat-]if-not-file or > > Or probably use rules like > > url.rewrite-once = ( > "^/media/" => "$0", > "^/(.*)" => "/my.fcgi/$1" > ) > > See: http://redmine.lighttpd.net/wiki/1/Docs:ModRewrite > > Artyom Beilis > Actually this is the soulution See: http://www.djangobook.com/en/beta/chapter21/#cn124 All rules there apply to CppCMS. Who is going to add this to the Wiki? :-) on serving CppCMS in the "web-root" Artyom > -------------- > > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > --- On Thu, 9/1/11, David Elrom <dav...@gm...> > wrote: > > From: David Elrom <dav...@gm...> > Subject: Re: [Cppcms-users] Attempting to run cppcms at > webroot > To: cpp...@li... > Date: Thursday, September 1, 2011, 4:18 AM > > i was going to use lighttpd. > > On Wed, Aug 31, 2011 at 3:40 AM, augustin <aug...@ov...> > wrote: > > > On Wednesday, August 31, 2011 01:28:12 PM Artyom Beilis > wrote: > > > So you need to do apply some URL rewriting rules such > that path > > > "/something" would map to lets say > "/blog.cgi/something" where "/blog.cgi" > > > is the FastCGI script name. > > > > I am not Allan, but that's what I did, too. > > > > David doesn't say which web server he uses. > > mod_rewrite with apache2 works like a charm. > > > > .htaccess: > > > > <IfModule mod_rewrite.c> > > RewriteEngine on > > > > RewriteCond %{REQUEST_FILENAME} !-f > > RewriteCond %{REQUEST_FILENAME} !-d > > RewriteRule ^(.*)$ my_app.cgi/$1 [L,QSA] > > </IfModule> > > > > > > Of course, Apache2 must be properly configured to allow > .htaccess override of > > mod_rewrite. > > > > David: this is likely to become a FAQ (literally): can you > add a new page > > about this somewhere in the wiki? > > > > Blessings, > > > > Augustin. > > > > > > > > -- > > Friends: http://www.reuniting.info/ > > My projects: > > http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ > > > > http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ > > > > http://openteacher.info/ http://minguo.info/ > > http://www.wechange.org/ http://searching911.info/ > > > > > > > > > > > > > > > > > > > > > > > > > > . > > > > ------------------------------------------------------------------------------ > > Special Offer -- Download ArcSight Logger for FREE! > > Finally, a world-class log management solution at an even > better > > price-free! And you'll get a free "Love Thy Logs" t-shirt > when you > > download Logger. Secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsisghtdev2dev > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even > better > price-free! And you'll get a free "Love Thy Logs" t-shirt > when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > -----Inline Attachment Follows----- > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even > better > price-free! And you'll get a free "Love Thy Logs" t-shirt > when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: augustin <aug...@ov...> - 2011-09-03 10:48:51
|
On Thursday, September 01, 2011 05:06:36 PM Artyom Beilis wrote: > Who is going to add this to the Wiki? :-) on serving > CppCMS in the "web-root" My understanding of David's short reply is that he declined to contribute the answers he got back to the wiki. So, I went ahead and did a quick copy/paste of the information contributed so far into a new wiki page: http://art-blog.no-ip.info/wikipp/en/page/run_application_web_server_root The page can be improved as required over time... linked from: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x I rearranged the TOC in the 1.x.x menu page, so that there is some logical order: 1) install cppcms. 2) configure the web server. 3) tutorials with more advanced topics. 4) references... The page can be improved as required over time... Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |
From: Artyom B. <art...@ya...> - 2011-09-03 11:40:28
|
> > So, I went ahead and did a quick copy/paste of the > information contributed so > far into a new wiki page: > http://art-blog.no-ip.info/wikipp/en/page/run_application_web_server_root > The page can be improved as required over time... > > linked from: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x > > I rearranged the TOC in the 1.x.x menu page, so that there > is some logical > order: > 1) install cppcms. > 2) configure the web server. > 3) tutorials with more advanced topics. > 4) references... > > > The page can be improved as required over time... > > > Augustin. > > > Thanks, Artyom |
From: David E. <dav...@gm...> - 2011-09-03 21:22:17
|
On Sat, Sep 3, 2011 at 7:40 AM, Artyom Beilis <art...@ya...> wrote: > > > > So, I went ahead and did a quick copy/paste of the > > information contributed so > > far into a new wiki page: > > > http://art-blog.no-ip.info/wikipp/en/page/run_application_web_server_root > > The page can be improved as required over time... > > > > linked from: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x > > > > I rearranged the TOC in the 1.x.x menu page, so that there > > is some logical > > order: > > 1) install cppcms. > > 2) configure the web server. > > 3) tutorials with more advanced topics. > > 4) references... > > > > > > The page can be improved as required over time... > > > > > > Augustin. > > > > > > > > Thanks, > > Artyom > > > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > Ouch augustin. No, I never even got a chance to look at Artyom's response for lighttpd, let alone configure / test it. -elrom |
From: augustin <aug...@ov...> - 2011-09-04 08:12:16
|
On Sunday, September 04, 2011 05:21:29 AM David Elrom wrote: > No, I never even got a chance to look at Artyom's response for lighttpd, > let alone configure / test it. I'm sorry, David. Please accept my apologies if I misrepresented your intentions. My perspective is somewhat similar to what Paradigm Shift proposed on the IRC thread: " Perhaps we could have a loose convention that the person who asked the question should take ownership of posting it back on the main wiki?" Anyway, the lighttpd section in the new page is a bit loose: http://art-blog.no-ip.info/wikipp/en/page/run_application_web_server_root so you still have the opportunity to make it a bit better after you've had time to conduct your tests. Blessings, Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |
From: David E. <dav...@gm...> - 2011-09-06 05:25:12
|
@Augustin no hard feelings :) I assure you that once I have any useful information I will be adding it to the wiki... As for the configuration (I've finally gotten around to it) It's almost working (lol?) I'm getting the following error out of lighttpd (I'm not even trying the mod rewrite webroot thing yet): *Error:* 2011-09-06 01:10:24: (request.c.304) fd: 6 request-len: 454 GET /blog HTTP/1.1 Host: 192.168.1.144 Connection: keep-alive X-Purpose: instant User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.865.1000 Safari/535.2 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: player-61646d696e=5; JSESSIONID=10a4mv8znmlna 2011-09-06 01:10:24: (response.c.300) -- splitting Request-URI 2011-09-06 01:10:24: (response.c.301) Request-URI : /blog 2011-09-06 01:10:24: (response.c.302) URI-scheme : http 2011-09-06 01:10:24: (response.c.303) URI-authority: 192.168.1.144 2011-09-06 01:10:24: (response.c.304) URI-path : /blog 2011-09-06 01:10:24: (response.c.305) URI-query : 2011-09-06 01:10:24: (response.c.349) -- sanatising URI 2011-09-06 01:10:24: (response.c.350) URI-path : /blog 2011-09-06 01:10:24: (mod_access.c.135) -- mod_access_uri_handler called 2011-09-06 01:10:24: (mod_fastcgi.c.3636) handling it in mod_fastcgi 2011-09-06 01:10:24: (response.c.470) -- before doc_root 2011-09-06 01:10:24: (response.c.471) Doc-Root : /var/www 2011-09-06 01:10:24: (response.c.472) Rel-Path : /blog 2011-09-06 01:10:24: (response.c.473) Path : 2011-09-06 01:10:24: (response.c.521) -- after doc_root 2011-09-06 01:10:24: (response.c.522) Doc-Root : /var/www 2011-09-06 01:10:24: (response.c.523) Rel-Path : /blog 2011-09-06 01:10:24: (response.c.524) Path : /var/www/blog 2011-09-06 01:10:24: (response.c.541) -- logical -> physical 2011-09-06 01:10:24: (response.c.542) Doc-Root : /var/www 2011-09-06 01:10:24: (response.c.543) Rel-Path : /blog 2011-09-06 01:10:24: (response.c.544) Path : /var/www/blog 2011-09-06 01:10:25: (response.c.128) Response-Header: HTTP/1.1 500 Internal Server Error Content-Encoding: gzip Content-Type: text/html; charset=utf-8 X-Powered-By: CppCMS/0.99.9 Transfer-Encoding: chunked Date: Tue, 06 Sep 2011 05:10:25 GMT Server: lighttpd/1.4.28 my *config.js* looks like this: "blog" : { "media" : "/media", "root" : "/blog", "host" : "192.168.1.144:8080", "connection_string" : "sqlite3:db=cppcms.db;@pool_size=10", //"connection_string" : "mysql:database=newpress;user=root;password=root;@pool_size=10;@use_prepared =on", "tex" : { "enable" : true, //"latex" : "/usr/bin/latex", // "dvigif" : "/usr/bin/dvigif", // "temp_dir" : "/tmp", // "output_dir" : "/var/www/media/tex" } }, "service" : { "api" : "fastcgi", //"ip" : "192.168.1.144", //"port" : 12345 //"port" : 8080 //"api" : "fastcgi", //"api" : "scgi", //"socket" : "/tmp/sock" "socket" : "stdin" }, "http" : { "script" : "/blog" }, "views" : { "default_skin" : "contendend" , //"default_skin" : "orangesky" , "paths" : [ "./" ], "skins" : [ "contendend" , "orangesky" ], }, "file_server" : { "enable" : true, "document_root" : "../" }, "session" : { "expire" : "renew", "timeout" : 604800, // a week "location" : "both", "client" : { "hmac" : "sha1", "hmac_key" : "232074faa0fd37de20858bf8cd0a7d10" }, "server" : { "storage" : "files" } }, "cache" : { "backend" : "thread_shared", "limit" : 100, }, "localization" : { "messages" : { "paths" : [ "./locale" ], "domains" : [ "blog" ] }, "locales" : [ //"he_IL.UTF-8", "en_US.UTF-8", ] } } And the relevant part of *lighttpd.conf* that I have is: fastcgi.server = ( ## The script name of the application "/blog" => (( ## Command line to run "bin-path" => "/opt/blog -c /opt/config.js", "socket" => "/tmp/hello-fcgi-socket", ## Important - only one process should start "max-procs" => 1, "check-local" => "disable" )) ) Any thoughts? -elrom On Sat, Sep 3, 2011 at 5:21 PM, David Elrom <dav...@gm...> wrote: > > On Sat, Sep 3, 2011 at 7:40 AM, Artyom Beilis <art...@ya...> wrote: > >> > >> > So, I went ahead and did a quick copy/paste of the >> > information contributed so >> > far into a new wiki page: >> > >> http://art-blog.no-ip.info/wikipp/en/page/run_application_web_server_root >> > The page can be improved as required over time... >> > >> > linked from: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x >> > >> > I rearranged the TOC in the 1.x.x menu page, so that there >> > is some logical >> > order: >> > 1) install cppcms. >> > 2) configure the web server. >> > 3) tutorials with more advanced topics. >> > 4) references... >> > >> > >> > The page can be improved as required over time... >> > >> > >> > Augustin. >> > >> > >> > >> >> Thanks, >> >> Artyom >> >> >> >> ------------------------------------------------------------------------------ >> Special Offer -- Download ArcSight Logger for FREE! >> Finally, a world-class log management solution at an even better >> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >> download Logger. Secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsisghtdev2dev >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > Ouch augustin. > > No, I never even got a chance to look at Artyom's response for lighttpd, > let alone configure / test it. > > -elrom > |