Mohammed, Your Wt executable will either behave as a stand alone http server, or as an fcgi application. This choice is determined by you, by choosing to link either to 'libwthttp.so' or 'libwtfcgi.so'.
Your executable is linked against libwthttp.so. This means that you can run 'hello.wt --docroot=. --htpp-address=0.0.0.0 --http-port=8080' and then you can surf to port 8080 on that machine and see your wt application. For fcgi, edit CMakeCache.txt, search for EXAMPLES_CONNECTOR and change 'http' in 'fcgi'. Alternatively, specify -DEXAMPLES_CONNECTOR=wtfcgi on the command line while running cmake. Run 'make' again in the examples directory, and you will now have fcgi binaries that you can deploy on apache. You will no longer be able to execute them with --docroot=. --http-ad.... - it is either the one or the other. You can see that you try to run a http executable in apache by the complaints about docroot not being set in the logfiles. The fcgi connector has no docroot setting. Best regards, Wim. 2010/9/26 Mohammed Rashad <[email protected]>: > my fcgi.conf - /etc/apache2/mid-enabled/fcgi.conf > <IfModule mod_fastcgi.c> > AddHandler fcgid-script fcg fcgi fpl wt > #FastCgiWrapper /usr/lib/apache2/suexec > #FastCgiIpcDir /var/lib/apache2/fastcgi > </IfModule> > my apache2 configuration /etc/apache2/sites-enabled/000-default > DocumentRoot /var/www > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > <Directory /var/www/> > Options Indexes FollowSymLinks MultiViews > AllowOverride None > Order allow,deny > allow from all > </Directory> > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +FollowSymLinks > Order allow,deny > Allow from all > </Directory> > > > > > ErrorLog /var/log/apache2/error.log > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > CustomLog /var/log/apache2/access.log combined > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > </VirtualHost> > > my apache error.log when executing http://localhost/cgi-bin/hello.wt > /var/log/apache2/error.log > ras...@rashad-laptop:~$ tail /var/log/apache2/error.log > stat: No such file or directory > Document root ("") not valid. > [Sun Sep 26 09:56:16 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" (pid 2237) terminated by calling exit with > status '1' > [Sun Sep 26 09:56:21 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" restarted (pid 2250) > stat: No such file or directory > Document root ("") not valid. > [Sun Sep 26 09:56:21 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" (pid 2250) terminated by calling exit with > status '1' > [Sun Sep 26 09:56:21 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:56:22 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:56:25 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > ras...@rashad-laptop:~$ tail /var/log/apache2/error.log > [Sun Sep 26 09:57:17 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:18 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:21 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:24 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:27 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:30 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:33 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:36 2010] [warn] FastCGI: (dynamic) server > "/usr/lib/cgi-bin/hello.wt" has failed to remain running for 30 seconds > given 3 attempts, its restart interval has been backed off to 600 seconds > [Sun Sep 26 09:57:36 2010] [error] [client 127.0.0.1] FastCGI: comm with > (dynamic) server "/usr/lib/cgi-bin/hello.wt" aborted: (first read) idle > timeout (30 sec) > [Sun Sep 26 09:57:36 2010] [error] [client 127.0.0.1] FastCGI: incomplete > headers (0 bytes) received from server "/usr/lib/cgi-bin/hello.wt" > ras...@rashad-laptop:~$ > Anyone please help I am giving the whole information I have. If anyone wants > more I am ready to provide.. > > On Sat, Sep 25, 2010 at 11:45 PM, Hanu Man <[email protected]> wrote: >> >> On Sat, Sep 25, 2010 at 9:42 AM, Mohammed Rashad >> <[email protected]> wrote: >> > Hi Dave, >> > I can run other cgi scripts and also python (.py files) within web >> > browser >> > I compiled and installed Wt. boost and graphicsmagick i installed from >> > ubuntu repo >> > also cmake detects both boost and graphicsmagick. >> > wt works when issuing this command >> > ./hello.wt --http-port 8080 --http-host 0.0.0.0 --docroot . >> > and when i point to localhost:8080 i can run the hello.wt application >> > but dont know how to configure wt to run .wt files from web browser >> > Is these information enough for you. I am ready to give any information >> > for >> > the working of .wt files >> > and Thanks for offering me help. I expect more from you... >> >> Mohammed - >> >> It sounds like you've made a good start. But don't expect too much. :) >> >> Have you tried copying hello.wt to your cgi-bin directory? Assuming >> that your httpd server is on your localhost, you might then try to >> execute your local copy of hello.wt by typing >> >> http://localhost/cgi-bin/hello.wt >> >> If you are going to use .wt as the suffix to your executables, you >> might have to modify your /etc/httpd/conf.d/fcgid.conf: >> >> <IfModule !mod_fastcgi.c> >> AddHandler fcgid-script fcg fcgi fpl wt >> </IfModule> >> >> and probably restart your webserver. >> >> Hope that helps. >> >> -Dave >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> witty-interest mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/witty-interest > > > > -- > Rashad > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest > > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
