On Jan 22, 2008, at 4:16 AM, James Wright wrote:

When using Apache to front end an Active4D powered site, how do I get Apache to pass over the correct 'host' information to Active4D? Currently it just passes 127.0.0.1?

Apache is sitting on port 80, our solution on 8080. Apache is being used to serve static content.

Here's my current rule (which works fine for our purposes):

                RewriteEngine On
                RewriteRule ^/(.*\.[aA]4[dD])$ http://127.0.0.1:8080/$1 [P,L]
                RewriteRule ^/4DCGI/(.*)$ http://127.0.0.1/$1 [P,L,nocase]
                ProxyPassReverse / http://127.0.0.1:8080
                ProxyRequests Off

I'd like to pretend I fully understand what's going on there but I don't. :)

After googling is "{HTTP_HOST}" what I'm looking for? But how to use it?

I do this in my "on execute start" method.

        _request{"ip"} := get request info("X-Forwarded-For") //proxy direct
        if (_request{"ip"} = "")
                _request{"ip"} := get request info("*remote address") //8010
        end if
        _request{"inurl"} := full requested url

At least in my situation (Apache 2), it puts the ip address of the host in request info("X-Forwarded-For"). If you access local (8080), it would be in remote address.

You can do a "a4d.debug.dump collection(request info) and see if it is there.

Steve Alex
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to