Custom https problem Version 1.49.1

rons

Verified User
Joined
Jan 11, 2016
Messages
13
Hi All,

Have a fresh Centos 7 and DirectAdmin 1.49.1 VPS up and running.
When I try to use a Custom HTTPD entry I get 403 errors. Before on other Directadmin installations this always worked flawlessly..

Any ideas where to look for the problem?


|*if DOMAIN="testdomain.com"|
|?DOCROOT=/home/testuser/domains/testdomain3.com/public_html|
|?OPEN_BASEDIR_PATH=/home/testuser/:/tmp:/usr/local/lib/php/|
|*endif|

This is also not working:

|?DOCROOT=/home/testuser/domains/testdomain3.COM/public_html|

Any help is appreciated!

Reds, Ron
 
Hello,

And what do you try to do? Do you try to point DOCROOT to another domain of the same user? Or to a domain of different user?
What do you in webserver error logs?
 
Hello,

And what do you try to do? Do you try to point DOCROOT to another domain of the same user? Or to a domain of different user?
What do you in webserver error logs?

Hi,

I want to point the DOCROOT to a domain of another user.
Have to look into the web server logs again, I did not find anything yesterday.
 
No, the script won't fix your issue and won't allow to point a document root to other user's public_html.

Directadmin powered server are designed the way that an user can not read content of other users' homedir. It means that user Bob can not read files from user Jack's homedir (including public_html/private_html), and point his document root to a domain which he does not own. That's a security concern.

So if for any reason you can not move domains under one and the same user account, you'd better use mount -o bind:

Code:
mount --bind /home/bob/domains/domain.com/public_html /home/jack/domains/domain2.com/public_html

This should help. That's up to you to test it properly and see whether or not it suits your needs. You will need to run the command every time the server boots, so you might need to use /etc/fstab for this.
 
Hi Alex,

That is weird as I always do it like this on 5 other servers running DirectAdmin...

Also Directadmin is referring to this in their help files:
http://help.directadmin.com/item.php?id=3
http://help.directadmin.com/item.php?id=199


I use Httpd.conf Customization

And then I add:

(Example: user1 with domain1.com to use docroot of user2 and domain2.com of user2)

|*if DOMAIN="domain1.com"|
|?DOCROOT=/home/user2/domains/domain2.com/public_html|
|?OPEN_BASEDIR_PATH=/home/user2/:/tmp:/usr/local/lib/php/|
|*endif|

Greets, Ron
 
Back
Top