1

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.

Lenny
  • 11
  • 1
  • 1
    What Linux distributions? What Apache versions? – Michael Hampton Aug 18 '21 at 01:22
  • 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. – Lenny Aug 18 '21 at 01:29

1 Answers1

0

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.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • 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! – Lenny Aug 18 '21 at 16:40
  • @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. – Michael Hampton Aug 18 '21 at 16:52
  • 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. – Lenny Aug 18 '21 at 18:04
  • @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. – Michael Hampton Aug 18 '21 at 18:19