Skip to content

Magento error message: 'Your web server is configured incorrectly'

When accessing the Magento administration console, you may encounter the error:

Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.

This error indicates a security misconfiguration in your Magento installation.

  • File permissions are set too permissively, allowing external access to sensitive configuration files.
  • The .htaccess file in the app subdirectory is missing or misconfigured.
  1. Log in to your hosting account via SSH or File Manager.

  2. Navigate to the app subdirectory of your Magento installation.

  3. Confirm that a .htaccess file exists.

  4. If missing, create a new .htaccess file with the following directives:

    apache

    Order deny,allow
    Deny from all
  • Directories should be set to 755 (owner read/write/execute, group/world read/execute).
  • Files should be set to 644 (owner read/write, group/world read).

You can reset permissions using SSH:

Terminal window
# Set file permissions
find . -type f -exec chmod 644 {} \;
# Set directory permissions
find . -type d -exec chmod 755 {} \;

After fixing permissions and .htaccess, clear Magento’s cache:

Terminal window
php bin/magento cache:flush
  • Always back up your site before making configuration changes.
  • Incorrect permissions may break functionality if set too restrictively.
  • If you are on ruachost.com shared hosting, contact support to confirm server‑level security settings.