Applicable to:
- Plesk for Linux
Symptoms
-
Website is not accessible with the
403 Forbidden
error in a browser. -
The website may work incorrectly, e.g. some images may not load.
-
In the
/var/www/vhosts/system/example.com/logs/error_log
one of the following errors appear:CONFIG_TEXT: AH00037: Symbolic link not allowed or link target not accessible: /var/www/vhosts/example.com/httpdocs/index.php
CONFIG_TEXT: AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/vhosts/example.com/httpdocs/, referer: https://servername.com/
- The domain may have been restored from a backup recently.
Cause
Symbolic links are not allowed in Apache configuration.
Resolution
-
Go to Domains > example.com > hosting & DNS tab > Apache & nginx Settings.
-
Disable the option Restrict the ability to follow symbolic links and apply changes.
-
Go to Domains > example.com > File Manager and add the following directive to the
.htaccess
file of the website:CONFIG_TEXT: Options +FollowSymlinks
-
Make sure that the symbolic link has correct ownership and permissions or add the following directive into
.htaccess
file of the website to disable symbolic link owner check:CONFIG_TEXT: Options -SymLinksIfOwnerMatch
Comments
7 comments
this didnt worked to me.
i cant use symbolic links with my laravel app.
everything was working until i used a backup restore to merge 2 different servers, at the same domain
i had at old server the same domain, when i used the backup to add all those files, databases and emails... something went wrong since my laravel app stopped working with the following error:
You don't have permission to access /public/index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
And i got the apache error:
AH00037: Symbolic link not allowed or link target not accessible
@Filipe Brito
Hi! Please check this article:
https://support.plesk.com/hc/en-us/articles/213939685-Website-hosted-on-Plesk-for-Linux-is-not-accessible-with-403-Forbidden-AH00529-pcfg-openfile-unable-to-check-htaccess-file-ensure-it-is-readable
Also check whether symlink is pointing to an existing file.
thanks @Alisa
I already tried that article too and i had no luck with it.
i cant understand why this isnt working but its very frustrating because before i used the plesk-backup-manager, this website was working properly :(
@Filipe Brito
Seems that the issue is quite complicated and needs further investigation. Please submit a request to our support as per https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support- and we will happily help.
i finally fixed it.
2 things i did:
1) removed all the imported ftp users from the backup
2) fixed the <home>/private permissions. seems plesk did something at the /private/ directory permissions and i couldnt reach it via http/symbolic_link
after i fixed the permissions at /private everything was working properly.
Maybe the ftp removal accounts werent needed afterall.
thanks for your help =)
@Filipe Brito,
Glad to know that you have managed to fix the issue! Maybe your experience will be helpful for other Pleskians.
In my case, it was file permissions that were the issue. See my answer here: https://unix.stackexchange.com/a/620603/307386
Please sign in to leave a comment.