views:

439

answers:

0

I’ve configure my apache accordingly from what I’ve read in the apache 2.2 manual. Taking the following as an example of my configuration.

ProxyRequests Off

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

ProxyPass "/home/kwokfu/sandbox" "http://localhost:8080/sandbox"
ProxyPassReverse "/home/kwokfu/sandbox" "http://localhost:8080/sandbox"

Everytime when I visit to http://localhost:8080/sandbox the server still point me back to where my localhost’s default document root instead of the one that I stated in the proxy configuration.

I don’t know what am I doing wrong here and that any help is really much appreciated!

For your reference, I compile my proxy module as following:

$ apxs -cia mod_proxy.c proxy_util.c
$ apxs -cia mod_proxy_http.c
$ apachectl -M
 ...
 proxy_module (shared)
 proxy_http_module (shared)
 ...

and get the following log message everytime i visit http://localhost:8080/sandbox:

"GET /sandbox HTTP/1.1" 404 206 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13"
...
[debug] proxy_util.c(1806): proxy: grabbed scoreboard slot 0 in child 11225 for worker http://localhost:8080/sandbox
[debug] proxy_util.c(1825): proxy: worker http://localhost:8080/sandbox already initialized
[debug] proxy_util.c(1922): proxy: initialized single connection worker 0 in child 11225 for (localhost)
[debug] proxy_util.c(1806): proxy: grabbed scoreboard slot 1 in child 11225 for worker proxy:reverse
[debug] proxy_util.c(1825): proxy: worker proxy:reverse already initialized
[debug] proxy_util.c(1922): proxy: initialized single connection worker 1 in child 11225 for (*)
[debug] proxy_util.c(1791): proxy: worker http://localhost:8080/sandbox already initialized
[debug] proxy_util.c(1791): proxy: worker http://localhost:8080/sandbox already initialized
...
[error] [client 127.0.0.1] File does not exist: /opt/apache2/2.2.12/htdocs/sandbox
...

Seems like the proxy is not working... This is driving me crazy...