There is a folder on centos server named as v2_3, and it contains a file named as test.php and on the browser, it's able to execute this file.
I cloned the code from git that has code similar to v2_3 with new changes inside its branch and named it as v2_3-git, then I executed test.php from this folder and it returned 404 error.
I thought it might be some issue with .htaccess on root which has Joomla project on a root. So I tried to rename v2_3-git to v2_3 and the original v2_3 to v2_3-git and thought that it should work now. But now test.php inside v2_3-git is executing properly but not inside v2_3 (code from git). Then I thought, something must be wrong with the code inside v2_3 (from git), but I tried to create another folder on root and created index.php inside it, and it didn't execute either. When I tried to execute .html files, they are working fine everywhere.
I tried to restart apache but the issue didn't resolve.
So what's happening to PHP files here? I don't see any difference between executing test.php from a v2_3 folder and v2_3-git folder or some other random folder with index.php file. I checked the permissions and ownership of folder v2_3 and v2_3-git and they are same, then what's wrong.?
As per Joomla, the folder should have 755 and files should have 644 permissions.