Android Question httpJob and apache vHosts issue

techknight

Well-Known Member
Licensed User
Longtime User
My apps were working perfectly fine until I migrated servers.

So I have my server configured with 2 different subdomains on the same domain, but they both point to the same IP address via A records.

I have my apache configured with 2 different VHOSTS for each subdomain, pointing to each of their own www home folders.

So when I go to each URL in the browser, it all works perfectly fine. Even have htaccess working properly.

But here comes the problem. my httpjob keeps timing out with read timed out. In the access.log, the first entry pops up and thats it. Once the app times out, the 2nd one pops up.

Both are here:

B4X:
24.246.166.244 - - [22/Feb/2018:21:14:48 -0500] "POST /Auth/index.php?action=activate HTTP/1.1" 401 3967 "-" "okhttp/2.4.0"
24.246.166.244 - activation [22/Feb/2018:21:14:49 -0500] "POST /Auth/index.php?action=activate HTTP/1.1" 200 231 "-" "okhttp/2.4.0"

any ideas? It seems as if OkHTTP/Httpjob isnt handling the vhosts correctly, as the server expects the correct data to know which vhost/www directory to point to.

I tried to use the GetRequest.SetHeader but it seems to be a missing function.
 
Last edited:

OliverA

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Yes authorization is on.

Don, Luckily I figured that one out a little bit later and I tried it, that did in fact work. Funny thing though, my Server has 2 NICs one of which is connected to the intranet and the other is connected to the external IP address which is hooked into the domains.

If my device is on the internal network I dont have any problems. Soon as my device is elsewhere on an outside network, thats when I have problems and have to send the HOST: Request.

Go figure. Still could be a config issue with the server, I cannot with certain rule it out.
 
Upvote 0
Top