use Symbolic link for public_html

parsibox

Verified User
Joined
Apr 18, 2013
Messages
50
hi
i have 2 user in my host ( in directadmin ) ( user X and Y )
i want link public_html of one user to other user ( link public_html of X to public_html of Y )
i create link but not work
Code:
AH00037: Symbolic link not allowed or link target not accessible: /home/safiraneme/domains/safiranemehr.com/public_html
after this i change owner of Symbolic link same as other folder
in this case site say: File not found.
after this i change httpd.conf of this user and i change DocumentRoot to other public_html
in this case php file not compiled and show php source on the site!!!
what can i do?
i use php 7 with fpm mode + directadmin 1.514
Code:
[root@server ~]# httpd -v
Server version: Apache/2.4.25 (Unix)
Server built:   Mar  7 2017 14:09:15
[root@server ~]# php -v
PHP 7.0.16 (cli) (built: Mar  7 2017 14:12:20) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
 
Hello,

You can

1. mount public_html of user X to Y:

Code:
mount /home/X/domains/domainX.com/public_html /home/Y/domains/domainY.com/public_html --bind

read-only mode

2. or change document root in apache/nginx settings (also read-only mode)
 
You're welcome. With mount option you need to take care of settings it permanent in order to get the folder mounted after a server reboot.
 
remove symlink

It's great
How we can remove this symlink!?
 
Back
Top