I decided to do a copy of my production server(2.3.4) to a local machine running Centos 8 for development testing.
Moved file/folders and did a database dump. Got everything to install and files/db installed. Manually changed URL in the database to the localhost IP. Made sure the env file had an updated DB connection. Magento commands all run great.
Yet when I browse to the site I get "Access Denied". I also get this browsing to the admin URL.
Checking the apache log files I get the below error when try accessing the site.
[Sun May 17 03:26:44.887007 2020] [proxy_fcgi:error] [pid 1557:tid 14 0028793571072] [client 192.168.0.223:43658] AH01071: Got error 'Unabl e to open primary script: /var/www/html/index.php (Permission denied) \n'
I tried looking it up but have not found any reason that would cause this. I have TRIPLE CHECKED all permissions on every file/folder. If I replace Index.php in my apache root folder I get a test site to show up fine. My production site is hosted by Siteground, Is there a chance it also uses Nginx AND Apache? Not familiar with Nginx, but it is the only thing that pops up when I google the error. My production site used .htaccess files so I figured Nginx wasn't a thing on it.
UPDATE: Discovered SELinux security issues with files. Discovered this via trying to load Http:/(web address)/info.php and got the same access denied error.
When running restorecon
on info.php it would now resolve! Thinking this is my issue I ran it on my web directory var/www/html
. I no longer get the Access Denied error loading the page or in the Apache logs.
Sadly it did not fix my site. It now just loads a blank screen with no error. Also no error in the logs. Any one have any ideas why? Did I possibly mess up permission issues trying to fix the previous issues. Is there a way to output a error message? Thanks!