Link domain to another drive

teva

Verified User
Joined
Jun 26, 2013
Messages
7
Hi all

I just added another drive (NLSAS) to my VPS and now want to link some domains to it. Right now i have everything in /home (SAS) and my new drive is /home1.
Any idea how to do that?

tnx
teva
 
Tnx this helped a lot

Now i have some more questions. I'm following this http://help.directadmin.com/item.php?id=451, which is for case, when home is filled up and you need home1 to replace it. In my case i wan't to use both at the same time and chose which one to use, when adding new domain. No need to see quotas in DA for home1 i just want to chose which home to use, when creating new user.

i don't understand step 1 and i tried all that and it didn't work. Step 2 is done, step 3 is not for me, since it changed home dir (i want to add it and use both), step 4 i used B and made a script, changed one user with it, moved user and all dirs to home1 and now, nothing works.

Any idea, what is wrong...apart from step1

tnx
teva
 
Ok, let's simplify this

I'm OK with DA to only use /home dir, but i want to manually add each user to /home1

So, correct me if i'm wrong

1. I create new user in DA, which will be made in /home/user
2. cp /home/user/* to /home1/user/*
3. Create symlink from /home/user/ to /home1/user/ (ln -s /home/user /home1/user)
4. Upload files to /home1/user/domains/../public_html

Will this work ok? Will i be able to use FTP on /home1/user/domains/.../public_html

tnx
 
Much time has passed since I've tried the same. So please try it and let us know how good is it working for you. In case you face any issue there, we will be happy to assist you further.
 
I tried nobaloney's suggestion and link is correctly made

in /home i see link user -> /home1/user

in /home1 i have /user/domains/user.com/public_html/ i added index.html there but when loading http://IP/~user i get You don't have permission to access /~user/ on this server.

Any idea, what went wrong?
 
You probably should chown the symlink to user. And update permissions in apache configs to allow requests to files located in /home1/.

Anyway whatever the error is caused by, you always can find details in apache error logs, so please read them.
 
Found this in Apache log

Symbolic link not allowed or link target not accessible: /home/user
 
You still probably should chown the symlink to user, and update permissions in apache configs to allow requests to files located in /home1/.
 
I did chown symlink, but how do i change permissions for apache

in /usr/local/directadmin/data/users/user/httpd.conf i replaced all /home/.. to /home1/..

Restarted apache and now in log i see this
(13)Permission denied: /home/user/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
 
I was talking about /etc/httpd/conf/extra/httpd-directories.conf, which contains among the other code the following lines:

Code:
<Directory /home>
        AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None
        Options IncludesNoExec Includes SymLinksIfOwnerMatch ExecCGI

        <Limit GET POST OPTIONS PROPFIND>
                Order allow,deny
                Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND>
                Order deny,allow
                Deny from all
        </LimitExcept>
</Directory>

You might need to update them to meet your needs and take care of protecting your modifications against being overwritten. Please search help.directadmin.com on how to achieve it.
 
It was chown problem, i had to set /home1/user to user:access instead user:user

tnx all...it works now.
 
Back
Top