0

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.

enter image description here

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!

0

1 Answer 1

0

UPDATE 2 and Answer: After getting the index.php to actually load although blank, I set it to display errors.

This lead me to see that zend cache couldn't write to the pub folder. Running chcon -R -t httpd_sys_rw_content_t on the directories got me up and running!

So, in the future fix SELinux issues when transferring servers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.