Apache is spitting out a HTTP response of code: 400 "Bad Request" without any particulars whenever I access a webpage driven that's handled with a FastCGI script.

  • I have installed the mod_fcgid module and it is loaded and set up within the Apache config files
  • I have examined several FastCGI scripts, these run when directly performed.
  • Static assets are offered properly.
  • Apache is attempting to produce the script since it gripes after i rewrite the Hyperlink to a non-existant script

Anybody have idea wrong with my Apache Config?

<VirtualHost ip.ad.re.ss:80>
  ServerName   demo.domain.com:80 

  DocumentRoot /var/www/vhosts/domain.com/subdomains/demo/rails/public
  CustomLog  /var/www/vhosts/domain.com/statistics/logs/demo_access_log combined
  ErrorLog  /var/www/vhosts/domain.com/statistics/logs/demo_error_log
  LogLevel info
  Options +FollowSymLinks +ExecCGI -SymLinksIfOwnerMatch
  AddHandler fcgid-script .fcgi

  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
</VirtualHost>

EDIT -- I have checked the mod_rewrite logs and URI's are now being rewritten properly

Try getting rid of the DOCUMENT_ROOT rewrite cond. Second, checkout the mod_rewrite log directives, they are very informative so far as strange issues such as this.

Okay, yet another factor to test.
http://httpd.apache.org/docs/2.2/mod/core.html#loglevel.

Set the log level to debug and make certain this really is this is not on a production machine since it produces lots of output per individual event (get/put).

I believe the way your example above of FastCGI is missing something, however i admit it has been some time since I have done not php or python fastcgi.
What language is dispatch.fcgi in? Are you able to carry it out in the command line and does Apache have permission to complete the file? ( sudo su apacheaccount ).

Update: Understood you had been missing something: take a look at -> http://fastcgi.coremail.cn/configuration.htm FCGIWrapper is required to tell fast cgi things to use to complete your dispatch.fcgi file.