Results 1 to 9 of 9
  1. #1

    Question cPanel Zone Templates Question

    So I'm trying to create some custom Zone Templates in WHM. I'm looking for some feedback on what I'm trying to do here, and you can tell me if this is going to work...

    Basically, in an effort to make my cpanel servers more PCI Compliant, I have to disable mod_userdir. Doesn't sound that hard does it? Well it is, as customers like to view their site before they change the nameservers. So I was thinking of trying something like Hsphere has, that being a "aliased" subdomain which points to the user's public_html. Then I could disable mod_userdir ... I think that makes sense.

    So my question is, what variables can I use in the Zone Templates Editor?

    %domain% = domain name
    %nameserverentry% = nameserver

    What other variables can I use here?

    I've already posted this in the cPanel forums, but either no one knows, or they are withholding the information from me

    I thought I would get some words from the WHT Community. Thanks!
    WebHostingPeriod.com
    Affordable, Reliable Web Hosting.... Period!

  2. #2
    Join Date
    May 2007
    Location
    Canada
    Posts
    183
    What about using the 'alias' option in apache?

    Alias /username "/home/username/public_html"

    Easiest way would be to use the includes editor for cPanel to add these lines in for each user. Then should then be able to visit the link below, and thier site content should be there:

    http://yourip/username

    I've not tried this, let me know if it works
    Quality Hosting - http://www.robohostingsolutions.com
    My Blog - http://solidservers.ca
    Freelance Server Administration (decent rates!) - Chris(at)SolidServers.ca

  3. #3
    Yes that works. Hmm, PCI has an issue with this one as well. It's basically the samething. That's why I'm trying to make it a subdomain. Then it will just register as a DNS issue, which won't be that high of a negative score.
    WebHostingPeriod.com
    Affordable, Reliable Web Hosting.... Period!

  4. #4
    Join Date
    Mar 2002
    Location
    Austin, TX
    Posts
    112
    I've included the variables in our DNS zone templates below. However, it appears that you'd be wanting to edit a different zone than is being created for the domain as their zone won't do any good until propagated.

    So, ideally, you'd set up something like customer1.jumptomydomain.com and then add a vhost in apache for that subdomain to go to the customer's site and then remove it when the site has propagated?







    The following variables are available within DNS zone templates:


    %cpversion% -- cPanel Version
    %domain% -- Name of the domain being created
    %ttl% -- Domain time to live
    %nsttl% -- Nameserver time to live
    %rpemail% -- Contact Email
    %serial% -- Serial

    %nameserver% -- hostname of primary nameserver
    %nameserver2% -- hostname of secondary nameserver
    %nameserver3% -- hostname of third nameserver
    %nameserver4% -- hostname of fourth nameserver
    %nameservera% -- IP of primary nameserver
    %nameservera2% -- IP of secondary nameserver
    %nameservera3% -- IP of third nameserver
    %nameservera4% -- IP of fourth nameserver

    %ip% -- IP of domain
    %ftpip% -- IP of FTP server for domain
    -Dave Koston
    Koston Consulting

  5. #5
    Thanks Dave. You understood what I'm saying, and yes you are correct. I would be editting another zone than is being created, so that wouldn't work.

    Any chances of something like this being created? I have to say, that's ONE good feature to Hsphere. I still prefer cPanel to anything else though. :-)
    WebHostingPeriod.com
    Affordable, Reliable Web Hosting.... Period!

  6. #6
    Join Date
    Mar 2002
    Location
    Austin, TX
    Posts
    112
    Quote Originally Posted by whservices View Post
    Thanks Dave. You understood what I'm saying, and yes you are correct. I would be editting another zone than is being created, so that wouldn't work.

    Any chances of something like this being created? I have to say, that's ONE good feature to Hsphere. I still prefer cPanel to anything else though. :-)
    It's definitely an interesting approach to the problem we currently try to solve using mod_userdir.

    So I take it in hsphere, you can set up a particular domain that you use for new domains to alias to and hsphere will add the DNS entry whenever an account is created?

    Is there an agent to remove that entry after say 3 days when DNS should be kicked in?
    -Dave Koston
    Koston Consulting

  7. #7
    Quote Originally Posted by DaveDark View Post
    It's definitely an interesting approach to the problem we currently try to solve using mod_userdir.

    So I take it in hsphere, you can set up a particular domain that you use for new domains to alias to and hsphere will add the DNS entry whenever an account is created?

    Is there an agent to remove that entry after say 3 days when DNS should be kicked in?
    In Hsphere, say the server hostname is: cp.domain.com ...
    It will create an alias say: da09a8ksl.domain.com to point to their web docs. <<< Note that it's random characters to help with security and the bandwidth issue you currently face with mod_userdir on cPanel.

    The alias actually remains there until the account is destroyed, but can be turned on/off by the user within Hsphere. But I think it would be good to autodelete after X amount of days. I don't know that I would set it to 3 days, maybe 30 days. Some customers will spend months developing a site before taking it live.
    WebHostingPeriod.com
    Affordable, Reliable Web Hosting.... Period!

  8. #8
    Join Date
    Mar 2002
    Location
    Austin, TX
    Posts
    112
    Quote Originally Posted by whservices View Post
    In Hsphere, say the server hostname is: cp.domain.com ...
    It will create an alias say: da09a8ksl.domain.com to point to their web docs. <<< Note that it's random characters to help with security and the bandwidth issue you currently face with mod_userdir on cPanel.

    The alias actually remains there until the account is destroyed, but can be turned on/off by the user within Hsphere. But I think it would be good to autodelete after X amount of days. I don't know that I would set it to 3 days, maybe 30 days. Some customers will spend months developing a site before taking it live.
    Thanks. Likely, we could allow you to set the amount of time before the entry is auto removed and default it at something long like 30 or 60 days.

    I'll make sure this hits the feature request system over here.
    -Dave Koston
    Koston Consulting

  9. #9
    Quote Originally Posted by DaveDark View Post
    Thanks. Likely, we could allow you to set the amount of time before the entry is auto removed and default it at something long like 30 or 60 days.

    I'll make sure this hits the feature request system over here.
    Very cool. I'll be looking for it!
    WebHostingPeriod.com
    Affordable, Reliable Web Hosting.... Period!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •