We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.20.5. Error 500 Internal Server Error

It is possible to reliably determine the cause of the error 500 by means of analysis. Errorlog site. Also, the tool “Website technical check" In chapter "My sites».

Often error 500 is associated with incorrectly specified directives in the file .htaccess, which is located in your site directory... You can edit this file using the built-in editor filemanager or any FTPclient.

If the problem was found to be related to the file .htaccess, then you should try making the following changes:

  • Options +FollowSymLinks - needs to be replaced with Options +SymLinksIfOwnerMatch.
  • Options All -Indexes - needs to be replaced with Options -Indexes.
  • +ExecCGI - you need to delete.

The hosting does not use the Apache module mod_version, so if in .htaccess there are blocks with directives IfVersionthey should also be removed, leaving only the contents of the Apache 2.4 blocks.

Comment out directives in the file .htaccess you can put the character at the beginning of the line # .

Attention!

It is not recommended to set the rights above 640 for files and 750 for directories, as this can result in a 500 error.

If in Errorlog the site has an error "Script file is writable by others", Then you need to restore the standard file permissions by instructions or manually, specifying the rights for the files 640.

This situation can occur when restoring from a backup or uploading files from a new site.

In most cases, it is sufficient to comment out this directive as it is used to enable compression based on Content-Type, and on our hosting nginx is responsible for compression and most often these requests do not reach Apache.

In Apache 2.2 format, the directive looks like this:

FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html

In Apache 2.4, the same directive looks like this:

FilterProvider  COMPRESS  DEFLATE "%{CONTENT_TYPE} = 'text/html'"

The situation can be corrected by changing the syntax of the directives from the old to the new one.

Comments at the end of a line may cause the error “…htaccess: No comments are allowed here».

In newer versions of Apache, the entire line is required to write a comment. That is, when you add the symbol #to make a comment, it must be the first nonblank character on the line. If you add any nonblank characters before the pound sign, you get a 500 error.

For example, any of these comments are correct:

# this is a comment
     ## this is another comment
                  ### multiple pound signs are fine

Examples of invalid comments leading to an error:

ExpiresActive on # this will trigger an error
RedirectMatch 403 /spamhole/ # this will trigger an error
# this will
           trigger an error

IN .htaccess when editing by third-party editors, invisible BOMsymbols, due to which the error occurs. To fix the problem, open the file in an editor, resave it in pure UTF-8 encoding and upload it back to the hosting.