New web applications on centos 7 server, calling other Application.cfc files from other directory
Good morning,
I have ran into a rather peculiar issue. I have a CentOS 7 server with ColdFusion 2018 installed and configured. Apache virtual directories are configures with correct directory structure to each web application document root via Plesk. I'm going to use two web applications in this example, although I am experiencing the same issue with others.
I have one web application that when navigated to loads the correct Application.cfc file in it's directory root: r1gup.egtyctest.com. The other web application, utgup2.egtyctest.com, is navigating to the r1gup.egtyctest.com Application.cfc file. I placed a javascript alert on each Application.cfc files to display which Application.cfc file is being called and what the current hostname is being requested. You can see the message when you navigate to either URL mentioned above. FYI, these applications are in testing, and you will get a warning message when you navigate to these URL's to proceed.
The web root of each application on the server is below:
Working application: /var/www/vhosts/r1gup.egtyctest.com/httpdocs
Application using aboves Applicaiton.cfc file: /var/www/vhosts/utgup2.egtyctest.com/httpdocs
The other strange occurence i'm having with this is if i restart the coldfusion or apache server, the issue can reverse. I will be able to navigate to the utgup2.egtyctest.com application and it will load the correct Application.cfc file and then r1gup.egtyctest.com will load utgup2.egtyctest.com Application.cfc file.
After all my testing, I do not think this is Apache related. The virtual hosts files for all the web applications have all the correct settings for the document roots, and if I default the first web page to be loaded with a simple index.html file, the correct page in the correct directory gets loaded. This seems to be ColdFusion looking for the first available Application.cfc file, and loading that file, not respecting the web applications document root folder.
Are there any other mappings I am missing to get the correct Application.cfc files loaded for each of my web applications? Any insight will be greatly appreciated.
-Daniel
