Skip to main content

How to Fix a 403 Error with mp_connector on an Apache Server?

Getting a 403 Forbidden error with mp_connector on an Apache server? Here's how to fix it by updating your .htaccess file or directory permissions.

A 403 Forbidden error means your server is blocking access to the mp_connector. This is most commonly caused by restrictive Apache configuration, either in the .htaccess file or directory settings.


Below are the most common causes and how to resolve them.


Problem 1: Web Server Security Rules (Apache / Nginx)

Some hosting providers block execution of unknown or custom scripts for security reasons. In this case, the web server configuration denies access to PHP or executable files that are not explicitly allowed.

To allow the connector to work, you must add an exception for the connector file.


Apache Web Server

You may find a .htaccess file in the root directory of your shop.

Step 1 - Open .htaccess

Open the file using any text editor.

Step 2 - Find blocking rule

Look for something similar to:

<FilesMatch ‘.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$’>
Order allow,deny
Deny from all


This rule blocks execution of PHP files.


Step 3 - Exclude connector.php

Modify the rule to exclude the connector file by adding a negative exception:

<FilesMatch ‘^(?!connector.php$).*.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$’>
Order allow,deny
Deny from all

This keeps server protection enabled while allowing the connector to run.


Nginx Web Server

Locate your Nginx site configuration file. Depending on your hosting environment, it may be located in:

/etc/nginx/sites-enabled/


or inside your project/server root directory (Docker or managed hosting setups).


Step 1 - Find blocking rule

Look for rules similar to:

location ~ .php$ {
deny all;
}

or:

location ~* .(php|exe|py)$ {
deny all;
}


These rules prevent the execution of PHP scripts.


Step 2 - Add connector exception

Add a more specific rule above the blocking rule:

location = /mp_connector/connector.php {
include fastcgi_params;
fastcgi_pass unix:/run/php/php-fpm.sock;
}

Note: the fastcgi_pass . The value may differ depending on server configuration.


Step 3 - Reload Nginx

After saving changes, reload Nginx:

sudo systemctl reload nginx


Problem 2: Firewall Restrictions

A 403 error may also be caused by a firewall or security system blocking access to the connector.

This may include:

  • Hosting firewall

  • ModSecurity

  • Cloudflare or similar protection

  • Server security plugins

How to check?

  1. Temporarily disable the firewall (if you manage the server).

  2. Try accessing the connector again.

  3. If it works, whitelist the connector path:

mp_connector/connector.php

or allow your integration IP address.

Problem 3: File Permissions

Incorrect file permissions can also result in a 403 error. Ensure the connector file exists and has readable permissions:

mp_connector/connector.php


Recommended permissions:

Files: 644
Folders: 755


On managed hosting platforms, make sure the web server user has permission to read the file.


👉 For other connector errors, see: Fixing Common Connector Setup Errors

Our Migrationpro Support Team is here to help!

Feel free to contact us via email at [email protected] or use the Live Chat available in the bottom-right corner of the page!

Did this answer your question?