500 Error on index.php file

I have found a question very similar to this, which I thought would solve my problem.

However, after changing my .htaccess file, with index.php on the end of the list, and then index.php as the only entry, I still cannot get index.php to display. Every other page works fine, but I don't know how to fix this. Thanks.


With a 500 error, you'll always want to start with checking your logs, in this case:

tail -f /var/log/apache2/error.log

You commented that the error log indicated:

PHP Parse error: syntax error, unexpected 'version' (T_STRING) in /var/www/index.php on line 1

This indicates that the content of index.php itself is likely the problem. Check line 1 for either a quoting issue of some sort (wrong number of quotes?) or perhaps the ; was left off the end of the line.


I think there may be any mistake at .htaccess file

The following resources may help you to resolve the issue

  • https://stackoverflow.com/questions/11540310/internal-error-500-with-htaccess-file
  • https://stackoverflow.com/questions/6348999/confounding-htaccess-errors-leading-to-error-code-500
  • https://stackoverflow.com/questions/1219135/mod-rewrite-for-clean-urls-gives-500-internal-server-error
  • https://stackoverflow.com/questions/12232907/htaccess-gives-500-error-on-localhost
  • http://wordpress.org/support/topic/500-internal-server-error-after-editing-indexphp-file
  • http://wordpress.org/support/topic/500-error-after-editing-permalink-options-help

EDIT : I think you also check @Lars Rohrbach comment

tail -f /var/log/apache2/error.log