Forum OpenACS Development: Re: Problems with connections

Collapse
Posted by Gustaf Neumann on
how comes, that your site receives GET requests with the host names included, such as in "GET http://www.yahoo.com/";. It looks to me as if somebody configured your server as Proxy. The requests should look like "GET /" or "GET /dotlrn".

It seems that OpenACS tries to give an error message, but fails, since ad_conn was not yet initialized (in particular "ad_conn -set file" was not yet executed).

Gustaf,

You are right, I try to configure my server as proxy using any web browser and I am getting the above error.

I guess that any server using aolserver gets this error.

Now, I have a question, how to avoid this kind of error from aolserver?

Thanks for your help!!!

Regards,

Cesar.

Collapse
Posted by Gustaf Neumann on
Strictly speaking the error does not come from aolserver, but from OpenACS. The OpenACS request processor does not support proxy requests. While there are some solutions for proxying with aolserver, it would require some programming work to integrate these with OpenACS. My recommendation is to use squid/nginx/apache or one of the various other proxy solutions a proxy server.
Gustaf,

In my case, i don't want to use my server as proxy.

I want to reject this kind of connection.

Any suggestion?

Regards

César.

I realized that it does not happen this error with aolserver 4.5, only with aolserver 4.0.10, I don't know exactly why.

To my installation with aolserver 4.0.10, I made the following patch, inside the proc “rp_handler” in the file “acs-tcl/tcl/request-processor-procs.tcl”.

The patch is:

800c800,808
< # information twice when for example we get a 404 internal redirect. We should probably
---

# information twice when for example we get a 404 internal
# redirect. We should probably

# Fix to when is trying to use my server like proxy

if {"http://[ns_set iget [ns_conn headers] Host]" ne [ns_conn location]} {
return [ns_conn close]
}

regards,

César Hernández