I can't say I've actually done this, but I'd try using one the CPAN modules that reads Apache configs (such as Config::ApacheFormat or Apache::ConfigFile) and comparing the data structures they parse ...
While Javascript is a client-side executing coding language, it still has to have permission from the Apache Web server in order to run properly. If Apache is configured incorrectly, the Javascript on ...