Project

General

Profile

Configuration question for FastCGI

Added by ahknight about 15 years ago

I have a set of servers running a Django application in FCGI mode, listening on internal IPs. I need to have Lighty use them for requests. If I root the application at a URL (say, "/foo") then everything works fine, and the config is straightforward: fastcgi.servers = ( "/foo" => ( etc.

However, I need to root this application at the root of the domain (foo.bar.com/, not foo.bar.com/foo). If there were a local script, I could root it at /foo and then use an alias to get back to it, but when I try that with remote FCGI servers, information about the URI includes the /foo information, which messes up some parts of Django.

I've tried using "/" as the selector in Lighty, and that fails. I've tried "" as well, with massive failure. How can I successfully attach my remote FCGI application to the root of the subdomain? I need all requests to foo.bar.com/ to 1. check local and then 2. hit the FCGI servers with no strange path information. I just can't seem to find the magic incarnation here.

(I have the ability to change the app servers from FCGI to SCGI or whatever else Django can support, if that will help here, but I think it's a Lighty configuration issue.)


Replies (2)

RE: Configuration question for FastCGI - Added by ahknight about 15 years ago

Specifically, the following two include the prefix that I'd like to go away, if I use the alias technique:

  • REDIRECT_URI (is /foo/location)
  • SCRIPT_NAME (is /foo)

I need those to be /location and /, respectively.

RE: Configuration question for FastCGI - Added by ahknight about 15 years ago

I should note: the problem with using "/" is that the first argument of the URL is stripped off when it gets to the FCGI server, thus breaking all of my URLs in Django ("/foo/bar/baz" becomes "/bar/baz"). If someone knows how to fix that then we're in business.

    (1-2/2)