Score:1

Default Apache 404 Message Appears to Be Different on ARM

cn flag

I'm working on porting my company's x86-64 app to ARM aarch64. I am finding a difference in the default 404 behavior of apache I cannot explain/fix. I have been unable to find apache docs to explain this, nor another similar issue on a site like this. Here is the issue, it seems trivial, but this difference is going to cause giant headaches with test automation.

Test output from aarch64:

expected> : The requested URL /test_alias/not_existing.html was not found on this server.

actual> : The requested URL was not found on this server.

In neither cause do we adjust 404 settings except like this:

RedirectMatch 404 /(.(svn.|git.))|/onelink/./(apache/.|profiles/.*)|(.(rem|soap|txml|pem|crt|key|conf|lst|utf8|ini|htaccess)$)

If anyone could help explain why this behavior is different on aarch64, it would be much appreciated.

Michael Hampton avatar
cz flag
What Linux distributions? What Apache versions?
Lenny avatar
cn flag
On x86-64 we do centos7 and redhat7. Apache versions 2.2.x and 2.4.9 on these platforms all have expected 404 output containing request path. On amazon linux aarch64 64 bit arm we're using apache 2.4.48. I did try looking for apache documentation on this being an intended change between 2.4.9 and 2.4.48, but I haven't been able to find it.
Score:0
cz flag

The "Apache" 404 page containing the URL is not in the original Apache source code, and as far as I can tell, has never been. It is a common enough customization, though. I've seen it at many web sites. It appears that Amazon has chosen not to make this customization.

Lenny avatar
cn flag
Yes, looking at that change log that appears to be the case. It's strange how any RPM we get for CentOS and Redhat has the customization though. It's less than ideal to have to update this behavioral expectation across Dev, QA, and Production test automation. However without compiling ourselves I don't see a way to get AWS aarch64 to match CentOS on x86-84. Having different behavior on different platforms I don't think is tenable, but I think we can manage to update the expectation across the board. It also might be prudent for me to look for alternate RPMS for AWS aarch64. Thanks!
Michael Hampton avatar
cz flag
@Lenny You could run CentOS or RHEL on the Pi? Best if you go with 8 though, as 7 was rather more of a tech preview. On that note it's quite odd you aren't doing 8 across the board.
Lenny avatar
cn flag
Good point, I could try to Run CentOS on the ARM system and see if that ends up with the same behavior. I think that's quite likely. Honestly, I'm not sure why we haven't tried going to 8. It hasn't really been discussed since I've been here. I should look into us doing that.
Michael Hampton avatar
cz flag
@Lenny For Internet connected web sites I will always go with the latest everything I can get and keep it updated. The risk of compromise I've judged to be far, far greater than the risk of some minor web site breakage, so I even have _automatic_ updates on in production. Your risk assessment may be a bit different for embedded devices, but building on something as recent as possible also gives your device a longer useful lifetime.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.