Published on 11/14/2024

How to Fix the 403 Forbidden Error in Plesk

If you’ve encountered a 403 Forbidden Error while hosting your website on Plesk, you’re not alone. This error can be frustrating, especially when your site files and database are perfectly fine, indicating that the issue lies in the server configuration rather than the site itself. Recently, we resolved this issue on our VPS hosting, and here’s a detailed guide on how you can do the same.

What Causes a 403 Error in Plesk?

A 403 Forbidden Error typically means that the web server is denying access to your website. Here are some common reasons:

  1. Incorrect file or directory permissions.
  2. Misconfigured web server settings (Apache or Nginx).
  3. Issues with the Web Application Firewall (WAF) settings.
  4. Missing or improperly set index.html or index.php files.

How We Fixed the 403 Error

1. Logged into the VPS via SSH

To diagnose and fix the issue, we accessed the server using an SSH client like PuTTY. Once logged in, we had full control to execute server commands.

2. Ran the Plesk Repair Command

We ran the following command to repair configurations, permissions, and settings:

[code lang=”bash”]

plesk repair all

[/code]

This command checks for issues in the file system, database, web server configurations, and more. Here’s what it fixed:

  • Incorrect permissions in the website’s root directory.
  • Web server configuration errors.
  • SSL/TLS certificate misconfigurations.

The repair process is interactive and asked for confirmations to fix errors. For instance, it asked whether to reconfigure permissions and repair the web server configuration. We confirmed with Y for all prompts, ensuring that everything was fixed.

After running the repair command, the 403 error was resolved, and the site loaded successfully.

Leave a Comment

Comments (0)

No comments yet. Be the first to comment!