Hi, Apache config question here. I'm dealing with an unusual project where I need to interface a WHM v104.0 w/ Apache 2.4 server with an old piece of technology from the early 90's with the simplest HTTP requests possible, so I have a socket on the old computer connected to the WHM server and I send a header like this:
HOST: somehost.com
GET /myscript.php HTTP/1.0
Connection: keep-alive
...but I'm getting back this response from Apache: (simplified here for readability)
HTTP/1.1 200 OK
Connection: close
It's halfway decent as it's not chunked (even though it's HTTP/1.1?!) and the content comes in clean so this is very good, but the issue is that it closes the connection IMMEDIATELY after the SERVER sent its last page bytes. The client is so old and slow that it randomly cannot grab the last few kilobytes before the connection is closed.
I went in WHM > Apache Configuration > Global Configuration and I see everything that's needed for a keep alive connection enabled, yet Apache seems to revert to "Connection: close" by itself.
Keep-Alive -> On
Keep-Alive Timeout -> 10
Max Keep-Alive Requests -> 200
Timeout -> 120
I have also tried adding this to a .htaccess file in the directory where the requested script is:
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
...but I'm getting back this response from Apache: (simplified here for readability)
HTTP/1.1 200 OK
Connection: keep-alive, close
... and it still closes the connection before the last few kilobytes are saved in the old computer (exactly the same).
Is WHM ignoring its own Global Configuration settings? I understand non-SSL HTTP/1.x requests are extremely old and not secure and should not be used in 2022 etc, but I'd like to know how to make it work in a way that old/slow technology can have at least a couple seconds to register the last few kilobytes of DATA sent by Apache before the door is slammed in its face and the connection is closed
HOST: somehost.com
GET /myscript.php HTTP/1.0
Connection: keep-alive
...but I'm getting back this response from Apache: (simplified here for readability)
HTTP/1.1 200 OK
Connection: close
It's halfway decent as it's not chunked (even though it's HTTP/1.1?!) and the content comes in clean so this is very good, but the issue is that it closes the connection IMMEDIATELY after the SERVER sent its last page bytes. The client is so old and slow that it randomly cannot grab the last few kilobytes before the connection is closed.
I went in WHM > Apache Configuration > Global Configuration and I see everything that's needed for a keep alive connection enabled, yet Apache seems to revert to "Connection: close" by itself.
Keep-Alive -> On
Keep-Alive Timeout -> 10
Max Keep-Alive Requests -> 200
Timeout -> 120
I have also tried adding this to a .htaccess file in the directory where the requested script is:
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
...but I'm getting back this response from Apache: (simplified here for readability)
HTTP/1.1 200 OK
Connection: keep-alive, close
... and it still closes the connection before the last few kilobytes are saved in the old computer (exactly the same).
Is WHM ignoring its own Global Configuration settings? I understand non-SSL HTTP/1.x requests are extremely old and not secure and should not be used in 2022 etc, but I'd like to know how to make it work in a way that old/slow technology can have at least a couple seconds to register the last few kilobytes of DATA sent by Apache before the door is slammed in its face and the connection is closed
Last edited: