I've been tasked with setting up an old application on a RHEL 7 server. It has an Angular front-end (I'm unsure of the version, but it's old) with a PHP backend. However, in the browser console I can see the Angular files such as angular.min.js and angular-route.min.js all return an error on line 1, column one: "Unexpected token", referring to the <!DOCTYPE html>
directive. Then the last message is "angular is not defined".
I suspect this is a problem with PHP? Apache serves the pages (Apache 2.4) but all I get are the text and basic html elements - no css and components & such. So my first question is this PHP or an Angular problem? We have another server with the same setup. I compared our custom configuration files and everything is the same. What else should I be looking for? After enabling PHP and httpd, we use the old apachectl
command to start the server (I know it's deprecated, but that's what my reference implementation is using). When I run my phpInfo.php script, all I get is the homepage again.
Here are some portions of my custom configuration. Note that I cannot find the mod_php7.c file on the server (probably the problem, but I don't know what to do instead):
AddType text/html .php
DirectoryIndex index.php
# I cannot find mod_php7.c on my server
<IfModule mod_php7.c>
# snip
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# snip
</IfModule>