Forum

Help with Proxy

Fred
11 April 2016, 09:48
Hi Hugo,

I use a Hiawatha proxy to server 8 other Hiawatha webserver..
When I look at the access and error log on the backend webserver, all the IP addresses are the one from the proxy server.
Also on the backend server, the access log file is never written to and all the data goes in the access file on the proxy .
Looked at tnabual and tough that I need HideProxy enable on backend server but not sure if this is what I need
Could you please help me resolve this two issue?

Hiawatha v10.1, cache, Monitor, reverse proxy, TLS v2.2.1, Tomahawk, URL toolkit, XSLT
Hugo Leisink
12 April 2016, 14:13
It's a known bug. The answer can be found here.
Fred
13 April 2016, 00:12
Hi Hugo,
I use FreeBSD and only have access to the port tree.
I haven't got a src/http.c file.
Could you please tell me if I can apply a fix in FreeBSD?
Hugo Leisink
13 April 2016, 11:36
I don't know exactly how the port tree works, but somewhere in the process is must download the source.
Fred
14 April 2016, 22:27
Hi Hugo,
When is the next version of Hiawatha release date?
Will it be fixed then?
Fred
14 April 2016, 23:20
Bellow are the step on how to create a patch in FreeBSD:
1. Run make patch to extract and apply patches that live in files/
2. Go to work/hiawatha-10.1/src and cp http.c http.c.orig then edit http.c and apply the fix
3. Go back to /usr/ports/www/hiawatha
4. Run make makepatch. This will generate a patch file in files/patch-src_http.c. You can save this for later or submit it to the port maintainer.
5. It's safe to run make clean now. If you later reinstall the port the patch will be automatically applied.
6. Build your port as you normally would.

Bellow is the patch that I generated.. It should save you some time:
files/patch-src_http.c
--- src/http.c.orig     2016-04-14 21:06:12 UTC
+++ src/http.c
@@ -845,9 +845,8 @@ int last_forwarded_ip(t_http_header *htt
/* Forwarded header
*/
begin = NULL;
- while ((forwarded = strcasestr(forwarded, "for=")) == NULL) {
- begin = forwarded;
- forwarded++;
+ while ((forwarded = strcasestr(forwarded, "for=")) != NULL) {
+ begin = forwarded + 4;
}

if (begin == NULL) {

Hugo Leisink
16 April 2016, 08:08
No, don't expect a release soon. The next version will have the Let's Encrypt script included and I first want to have it more solid and reliable.
This topic has been closed.