http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252013-11-04T08:53:19ZRedmineWt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=71622013-11-04T08:53:19ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul><p>Hey,</p>
<p>The use of addResource() with a FastCGI connector is a bit contrived: you first need to make sure that the request is forwarded from apache to the Wt FCGI application. The addResource() API calls in WServer then take a 'pathInfo' argument really as the URL, so they aren't absolute URLs but URLs relative to the 'deployment path'.</p>
<p>Regards,<br><br>
koen</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=71752013-11-06T08:26:07ZVitaly Volochaydhnotimba@yandex.ru
<ul></ul><p>Thanks, Koen! Than the answer is how to forward request from apache to my Wt FCGI application?</p>
<p>I have application with static resource added to path '/service':</p>
<p><code>server.addResource(new MyResource, "/service");</code></p>
<p>Assume I have simple apache (which is not true actually, in real one I use proxy pass + rewrite engine) config:</p>
<p><IfModule mod_fcgid.c><br><br>
Listen 10101<br><br>
NameVirtualHost *:10101<br><br>
<VirtualHost *:10101></p>
<p>IdleTimeout 3600<br><br>
ProcessLifeTime 7200<br><br>
IPCConnectTimeout 300<br><br>
IPCCommTimeout 7200<br><br>
BusyTimeout 300</p>
<p>DocumentRoot /var/www/myapp/docroot/<br><br>
AddHandler fcgid-script wt<br><br>
DirectoryIndex my_app.wt<br><br>
<br><br>
Order Deny,Allow<br><br>
Allow from all<br><br>
Options +ExecCGI -Indexes<br></p>
<p>FcgidInitialEnv WT_APP_ROOT /var/www/myapp/approot/<br></p>
<p>SetEnv MYAPP_CONF_PARAM my_app.xml<br></p>
<p>When I am trying:</p>
<p>curl -X POST <a href="http://localhost:10101/my_app.wt/service" class="external">http://localhost:10101/my_app.wt/service</a></p>
<p>Server returns js code of server (seems to me like this), same as i send request to <a href="http://localhost:10101/my_app.wt" class="external">http://localhost:10101/my_app.wt</a>. Obviously /server resource does not proccess it.<br><br>
So how to make correct forwarding requests from apache to wt app?</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=72182013-11-14T22:44:39ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>InProgress</i></li><li><strong>Assignee</strong> set to <i>Koen Deforche</i></li></ul><p>Hey,</p>
<p>Your setup looks indeed correct. We will see if we can reproduce this issue. Is the configuration above really the actual configuration since you say that you actually use a proxy_pass + rewrite engine?</p>
<p>Regards,<br><br>
koen</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=72212013-11-15T08:55:46ZVitaly Volochaydhnotimba@yandex.ru
<ul><li><strong>File</strong> <a href="/attachments/1382">wt_app_apache.conf</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1382/wt_app_apache.conf">wt_app_apache.conf</a> added</li></ul><p>Thanks for you help!<br><br>
I attached my real configuration. I tried both configs and requests didn't reach wt application.</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=73172013-11-22T10:29:52ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>InProgress</i> to <i>Feedback</i></li></ul><p>Hey,</p>
<p>Sorry that it took some time, but I've now tested this again and it does work as expected for me. One thing to note is that the order of the entry paths is taken into account. You should thus deploy the resource before you deploy the actual application:</p>
<pre><code> server.addResource(resource, "/service);
server.addEntryPoint(Application, ..., "");
</code></pre>
<p>I tested this with the blog example, so you may want to see if that does work for you and if so what is the difference with your project.</p>
<p>Regards,<br><br>
koen</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=73312013-11-25T11:30:20ZVitaly Volochaydhnotimba@yandex.ru
<ul></ul><p>Thx, Koen! Issue with order solve the problem.</p>
Wt - Support #2384: Server does not process http requests under apachehttp://redmine.emweb.be/issues/2384?journal_id=73472013-11-27T11:01:47ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul>