• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Symlink two httpdocs domains

Jan Bludau

Basic Pleskian
hello everybody,

i tried a couple of things i had done the symlink from one httpdocs (domain.de) to another httpdocs (domain.com main domain).
i can't use domain alias because of seperate E-Mail Stuff.

A Example symlink for domain.de (usr_a : psacln) points to domain.com (usr_x : psacln)

ln -s -v /var/www/vhosts/domain.com/httpdocs/ ./httpdocs

chown -h usr_x ; psacln ./httpdocs (domain.com) for the symlink
chmod 0755 ./httpdocs

i had disabled the ristriction on both domains to follow the symlink.

i can access stuff in domain.com/example.css without problems but i can't access *.php files (usr_a : psacln) i receive an error of if i remember access denied.

i tried
Options +SymLinksIfOwnerMatch
Options -SymLinksIfOwnerMatch
in apache http and https directives.

in .htaccess
Options -SymLinksIfOwnerMatch
Options +FollowSymlinks

i tried open_base_dir directory to extend to /var/www/vhosts/domain.com/httpdocs/ for the symlinked domain.de.

i tried apache fastcgi, apache php-fpm, nginx php-fpm no result.

can anybody help me where is my mistake?
is it possible with plesk to do that symlink stuff.

i wanna host multiple domain with one source-code with different email-boxes, own SSL ...

in domain.de i receive this message.

AH00037: Symbolic link not allowed or link target not accessible: /var/www/vhosts/domain.de/httpdocs

after following the guide:

the ownership of domain.de must be domain.com with usr_x . psaserv and the option Options -SymLinksIfOwnerMatch had to be in domain.de http / https directive under apache

Website on Plesk shows 403 Forbidden: Symbolic link not allowed or link target not accessible​

Website on Plesk shows 403 Forbidden: Symbolic link not allowed or link target not accessible

but now i receive this error "AH01071: Got error 'Primary script unknown'"

in the frontend i see "File not found."

TIA
 
Last edited:
Are both domains in the same subscription? Else it won't work, because the files have different owners.
 
Are both domains in the same subscription? Else it won't work, because the files have different owners.
fast reply - really fast =D
sorry for editing my post.

i'm the subscriber of both domains - thats what i'm see under subscriptions. subscriber "Jan Bludau".
i can access any file but not *.php is executed, if i symlink had i to put the directory in the open_basedir ?
i don't understand the syntax of PHP: Beschreibung der php.ini-Direktiven des Sprachkerns - Manual

it looks like "{WEBSPACEROOT}{/}{:}{TMP}{/}"

but it think i had to {WEBSPACEROOT}{/}{:}{TMP}{/}{:}{/var/www/vhosts/domain.com/httpdocs/} is this right?

is this the syntax?

in the frontend i see "File not found." in the browser.
 
webspaceroot includes everything that starts from the subscriber's root directory.

Being the subscriber of both domains does not mean that they are in the same subscription. Are both domains in the same subscription or are they located in different subscriptions? The point is that PHP runs with the subscription user, hence it can only access the files that belong to the subscription user. If the files are located in different subscriptions, they are owned by different users. One PHP instance cannot run the php files that do not belong to it.

The open_base_dir restriction is something different. It tells PHP where it is allowed to look for files in general. But even if you allow PHP to look everywhere on your server, it does not mean that you can run .php files found elsewhere that belong to someone else.
 
i had run this

Issue - AH01071: Got error 'Primary script unknown' happens every few days

plesk repair fs -y domain.de

domain.com is also gone errored.

[core:crit] (13)Permission denied: AH00529: /var/www/vhosts/domain.com/httpdocs/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/vhosts/domain.com/httpdocs/' is executable

i run plesk repair fs -y domain.com everything ok, there is a symlink check missing, nice to know.

is this a error in the plesk cli tool? if symlinks are present?
 
Last edited:
webspaceroot includes everything that starts from the subscriber's root directory.

Being the subscriber of both domains does not mean that they are in the same subscription. Are both domains in the same subscription or are they located in different subscriptions? The point is that PHP runs with the subscription user, hence it can only access the files that belong to the subscription user. If the files are located in different subscriptions, they are owned by different users. One PHP instance cannot run the php files that do not belong to it.

The open_base_dir restriction is something different. It tells PHP where it is allowed to look for files in general. But even if you allow PHP to look everywhere on your server, it does not mean that you can run .php files found elsewhere that belong to someone else.

i never thought about the "subscriptions" i know the subscribers and that they can access there owned stuff, emails, domains really nice solution. For me more time to hacking arround.

if i understand you both domains had to run under the same user for example usr_x (domain.com main domain and there is the source of my own CMS located).

i don't know how to archive that. i had the webhosting unlimited with subscription on board.
but how to put both domains in the same subscription?
 
i never thought about the "subscriptions" i know the subscribers and that they can access there owned stuff, emails, domains really nice solution. For me more time to hacking arround.

if i understand you both domains had to run under the same user for example usr_x (domain.com main domain and there is the source of my own CMS located).

i don't know how to archive that. i had the webhosting unlimited with subscription on board.
but how to put both domains in the same subscription?

i found the domain "move" option to move the domain to another subscription.

i receive this error:

domain.de was not moved to domain.com
Directory upload not supported.

i think a symlink stuff.
 
webspaceroot includes everything that starts from the subscriber's root directory.

Being the subscriber of both domains does not mean that they are in the same subscription. Are both domains in the same subscription or are they located in different subscriptions? The point is that PHP runs with the subscription user, hence it can only access the files that belong to the subscription user. If the files are located in different subscriptions, they are owned by different users. One PHP instance cannot run the php files that do not belong to it.

The open_base_dir restriction is something different. It tells PHP where it is allowed to look for files in general. But even if you allow PHP to look everywhere on your server, it does not mean that you can run .php files found elsewhere that belong to someone else.

it is the solution i moved the domain domain.de to domain.com in the same subscription now is everythink working as expected :)

thank i wouldn't find the solution on my own.
 
Back
Top