The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Open Basedir protection & DOCUMENT_ROOT: best practises?

Discussion in 'Security' started by Vliegtuig, Jan 22, 2010.

  1. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    Hi everyone,

    We have recently setup a new server with Cpanel. When creating accounts, the preview URL is set to <ip>/~username by default.

    Some questions:

    • Is it possible to change the default preview link used for account creation?
    • We are obviously having trouble with the DOCUMENT_ROOT variable using the ~username postfix. Is there any way to "fix" this?
    • Is it possible to automatically create another DNS zone based on the main domain on account creation? The best solution for temporary urls I can come up with is to create an extra parked domain clientdomain.com.myserver.com.

    Any tips and pointers on this subject would be appreciated.
     
    #1 Vliegtuig, Jan 22, 2010
    Last edited: Jan 22, 2010
  2. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    *bump*

    Anyone?
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You can program your Cpanel to automatically allow for subdomain addresses at your server domain or whatever domain you wish
    instead of "~user" and this is actually much more preferable.

    I typically disable USERDIR entirely (~user) and just use the
    wildcard subdomains at the temporary address for clients.

    The process to set that up is actually quite simple but the instructions
    to try to type that out would be quite long and more than the few
    moments I have available at the moment here to check my messages.

    If you would like to try this though, message me and I'll either try to
    give you a hand with that one on one or at least get you a copy of
    the instructions so you can set this up as soon as I get a few open
    moments to get back to you.
     
  4. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    That seems like a great solution. Disabling mod_userdir is something I really prefer and setting up automatic setupdomains would be a great solution.
     
  5. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    Does anyone have more infomation about this procedure or any alternatives? I have sent a PM to Spiral but I think he has not had the time to respond yet.
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Yep quite busy but you caught me in chat now. ;)

    Let me know if you need help on anything else ....
     
  7. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    Quick update and more questions

    An update:

    Using Spiral's help, I configured Cpanel to create extra domain aliases for each domain on creation. This is done by editing the /var/cpanel/templates/vhost.local file and adding the serveralias entries by hand.

    This solution has some downsides to it:

    • This only works for accounts created via the 'root' reseller
    • The parked domains overview shows EVERY entry included here

    Are there any alternatives? It's simply not possible to force account creation by root, and the parked domains overview is incredibly cluttered.

    Any help would be greatly appreciated.
     
  8. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    Anyone?

    A suitable alternative would be the ability to create per reseller vhost creation templates so that reseller1 would have domains like someclient.reseller1.com and reseller2 would have someclient.reseller2.com.

    I am trying to figure out a way to do this, but have not found a solution yet.
     
Loading...

Share This Page