[Catalyst] FastCgiServer: redefinition of a previously defined FastCGI server error when adding SSL VHost

Andrew Rodland andrew at cleverdomain.org
Mon Dec 13 10:30:28 GMT 2010


On Sunday, December 12, 2010 09:55:33 pm Eric Berg wrote:
> This may be more of a FCGI question, but since it's happening with my
> Catalyst app, I'll ask you folks.
> 
> I got my SSL cert installed and generally am configured for Apache 2.2
> to serve up my site via SSL, but when I enable the FCGI config for the
> SSL site, I get the following error:
> 
> FastCgiServer: redefinition of a previously defined FastCGI server error
> when adding SSL VHost
> 
[snip] 
> I would think that the different VHosts had different contexts for FCGI,
> but when this config appears in both ssl and non-ssl vhosts, I get that
> error.
> 
> Anyone have any solutions for this?

No, FastCgiServer declarations are global, and the namespace for the "mount 
points" is global. Apache lets you place the config lines inside of a vhost, 
but that doesn't actually do anything different than if you'd placed them 
outside of a vhost.

The good thing is that now that you know this, you probably don't have to do 
anything besides remove one of the conflicting lines. I find that the best 
organization is to have three different stanzas in three included files (in 
the sites-available/ directory of a debian-based config in my case, but you 
can adjust to taste): a file called "sitename-run-fcgi" only contains the 
FastCgiServer, FastCgiOptions, or any other config relevant to making the 
FastCGI available; a file called "sitename" contains the nonsecure vhost, and 
a file called "sitename-secure" contains the SSL vhost. Both of the latter 
files use the FastCGI mountpoint set up by the first file.

Andrew



More information about the Catalyst mailing list