New CentOS WordPress install: Error 500

  Was asked to troubleshoot a client’s installation technique for WordPress on CentOS 6.x yesterday; they were receiving an Error 500 when they tried to access index.php for the first time. Checking the Apache logs showed:  
SoftException in Application.cpp:431: Mismatch between target GID (522) and GID (65531) of file “/home/andrea/public_html/index.php” Premature end of script headers: index.php
  What was happening was that the client was un-tarballing the latest.tar.gz file as root and then changing the ownership of the file with the following:  
chown -R [user] *
  Changing that command to:  
chown -R [user]:[usergroup] *  
e.g. here:  
chown -R andrea:andrea *
  fixed that error. By not specifying the new group there was an ownership mismatch where the system expected one group but got another. There are many¬† causes for an Error 500 – it’s a good habit to check the Apache logs first for pointers as to where to start troubleshooting.