title: Wt FastCGI Incomplete headers (0 bytes) received from server
body: <p>I'm struggling to set up Apache to work with a Wt app on FastCGI.</p>
  
  <p>I'm using arch linux and Apache 2.4.7.
  gcc 4.9.0 20140604</p>
  
  <p>The <a href="http://www.webtoolkit.eu/wt/src/hello" rel="nofollow">hello world</a> example, which is the simplest example there is, after compilation gives me this error:</p>
  
  <pre><code>[Thu Sep 11 22:46:01.208926 2014] [fastcgi:error] [pid 27628] (101)Network is unreachable: [client 127.0.0.1:52788] FastCGI: failed to connect to server "/xxx/hello/hello.wt": connect() failed, referer: http://local.hello/
  [Thu Sep 11 22:46:01.208992 2014] [fastcgi:error] [pid 27628] [client 127.0.0.1:52788] FastCGI: incomplete headers (0 bytes) received from server "/xxx/hello/hello.wt", referer: http://local.hello/
  </code></pre>
  
  <p><strong>Here's what I do</strong>:</p>
  
  <p>Compile with:</p>
  
  <pre><code>$ g++ -o hello.wt hello.cpp -lwtfcgi -lwt
  </code></pre>
  
  <p>My vhost:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin admin@xxx.com
      DocumentRoot "/xxx/hello"
      ServerName local.hello
      ErrorLog "/var/log/httpd/local.hello-error_log"
      CustomLog "/var/log/httpd/local.hello-access_log" common
      &lt;Directory /xxx/hello/&gt;
          Options All
          Require all granted
      &lt;/Directory&gt;
      FastCgiExternalServer /xxx/hello/hello.wt -host 127.0.0.0:9090
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and my fastcgi.conf that's being included from httpd.conf:</p>
  
  <pre><code>&lt;IfModule fastcgi_module&gt;
    AddHandler fastcgi-script .wt
  #  FastCgiIpcDir /tmp/fcgi_ipc/  # DOESN'T COMPILE WITH THIS UNCOMMENTED
    FastCgiConfig -idle-timeout 100 -maxClassProcesses 1 -initial-env WT_APP_ROOT=/tmp
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>If I compile it with:</p>
  
  <pre><code>$ g++ -o hello.wt hello.cpp -lwthttp -lwt
  </code></pre>
  
  <p>and run it with:</p>
  
  <pre><code>$ ./hello --docroot . --http-address 0.0.0.0 --http-port 9090
  </code></pre>
  
  <p>everything works fine, so I'm thinking it's something with my apache/fastcgi setup.</p>
  
  <p>Every hint is mostly appreciated.</p>