Knowledgebase

Web Statistics page in Plesk shows 403 Forbidden error: Symbolic link not allowed or link target not accessible

Which response do you prefer?
Response 1

The "403 Forbidden" error in Plesk's Web Statistics page, along with the message "Symbolic link not allowed or link target not accessible," typically indicates an issue with the configuration or permissions of symbolic links used for web statistics.

Here are steps to diagnose and resolve this issue:

  1. Check Directory Permissions:

    • First, ensure that the directory containing the web statistics files has the correct permissions. Use the following command to set the appropriate permissions:
      bash
      chmod -R 755 /path/to/web/stats/directory
  2. Check File Ownership:

    • Make sure that the files within the web statistics directory are owned by the correct user and group. You can use the chown command to change ownership if necessary.
  3. Check for Symbolic Links:

    • Identify the symbolic links within the web statistics directory that may be causing the issue. You can list symbolic links using the ls -l command.
  4. Check Symbolic Link Target:

    • Verify that the target of the symbolic links is accessible and correctly configured. If the target directory or file doesn't exist or has incorrect permissions, it can result in a "403 Forbidden" error.
  5. Verify Web Statistics Configuration:

    • In Plesk, go to "Websites & Domains" > [Select Domain] > "Web Hosting Access." Ensure that the option "Web statistics" is set to "Allow."
  6. Check SELinux (if applicable):

    • If you're using a server with SELinux enabled, it might be restricting access to symbolic links. Check the SELinux context of the symbolic links and target directories/files, and adjust them accordingly using the chcon command.
  7. Check Apache or Nginx Configuration:

    • Review your web server (Apache or Nginx) configuration files to see if there are any directives that might be blocking access to symbolic links or the target directories. Ensure that there are no restrictions in place.
  8. Restart Web Server:

    • After making any changes to the permissions, ownership, or configuration files, restart your web server to apply the changes. Use the following commands based on your web server:

      For Apache:

      service apache2 restart

      For Nginx:

      service nginx restart
  9. Test Access:

    • Once you've made the necessary adjustments, test access to the Web Statistics page again to ensure that the "403 Forbidden" error is resolved.
  10. Check Logs:

    • If the issue persists, check the web server logs (e.g., Apache error logs or Nginx error logs) for any specific error messages that might provide further information about the problem.

If you're unable to resolve the issue after following these steps, it may be necessary to seek assistance from your hosting provider or a system administrator who can diagnose and resolve the problem more specifically with your server configuration.

ChatGPT
Response 2

The "403 Forbidden" error on the Web Statistics page in Plesk, accompanied by the message "Symbolic link not allowed or link target not accessible," indicates that there may be an issue with the configuration of the web statistics tools, or a permissions problem related to symbolic links.

Here are steps to troubleshoot and potentially resolve the issue:

  1. Check Permissions:

    • Ensure that the directories and files related to the web statistics are owned by the correct user and have the correct permissions set. Typically, the statistics data is stored in directories like /var/www/vhosts/example.com/statistics or similar.

    • Use the following command to set the correct ownership and permissions for the statistics directory:

      bash
      chown -R web_server_user:psaserv /var/www/vhosts/example.com/statistics chmod -R 755 /var/www/vhosts/example.com/statistics
    • Replace web_server_user with the actual user that the web server runs as (commonly apache or nginx).

  2. Disable and Re-enable Web Statistics:

    • In the Plesk panel, navigate to "Websites & Domains" > [Select Domain] > "Web Hosting Access" and disable the option "Web statistics."

    • After a few moments, re-enable it.

  3. Check for Symlinks:

    • Verify that there are no broken or inaccessible symbolic links within the statistics directory.
  4. Verify Web Statistics Configuration:

    • Make sure that the web statistics tools (e.g., AWStats, Webalizer) are correctly configured in Plesk. Go to "Tools & Settings" > "Web Statistics Settings" and ensure the correct tools are selected.
  5. Check for Custom Rules in .htaccess:

    • Review any .htaccess files in the domain's directory or subdirectories to ensure there are no custom rules blocking access to the statistics.
  6. Restart Web Server:

    • After making any changes, it's a good practice to restart the webserver to apply the modifications.
  7. Check SELinux or AppArmor:

    • If you're using SELinux (on CentOS/Red Hat) or AppArmor (on Ubuntu), they might be blocking access. Check the logs and adjust security policies if necessary.
  8. Examine Logs:

    • Review the web server error logs (/var/log/httpd/error_log or /var/log/nginx/error.log) for any specific error messages related to the Web Statistics page.
  9. Contact Support:

    • If the issue persists and you're unable to find a resolution, consider reaching out to Plesk support for further assistance.

Always backup any critical data before making changes to your server configuration, and proceed with caution.

  • 0 Users Found This Useful
Was this answer helpful?