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.

cpanel3-skel directory issue

Discussion in 'General Discussion' started by Website Rob, Mar 3, 2003.

  1. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Here's what I would like to do. When a new account is created have a default index page show:

    Future Home of "Domain name".

    Within Cpanel itself, it uses this coding: <cpanel print="DOMAIN"> to show, for example:

    Welcome "Domain name"
    Last login from: whatever

    Now, one can create custom files and directories within the Reseller account using:

    /home/accountID/cpanel3-skel/public_html/

    but the above code for "DOMAIN" does not work.

    Does anyone know the coding/path to get the above to work?
     
  2. ozzi4648

    ozzi4648 Guest

    There isnt one. The simple things like deploying a generic html to clients with their domain name la di da seems to be an impossibility! Even bloody Ensim does better then that!
     
  3. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    #3 Juanra, Mar 3, 2003
    Last edited: Mar 3, 2003
  4. ozzi4648

    ozzi4648 Guest

    SERVER NAME? He wants domain name.
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Another option is the way we do it.

    I've modified wwwacct to create another file when an account gets created. This file called acct.info is put in /home/user/
    In the file is the domain name, ip address and username.

    Then using php we set each to a variable to create the index.

    As an example

    $FILEPATH = "/home/user/acct.info";
    $FILE = fopen($FILEPATH, "r");
    $a = fgets($FILE, 300); ##DOMAIN NAME
    $b = fgets($FILE, 300); ## IP/Server Name
    $c = fgets($FILE, 300); ## UserName
    fclose($FILE);

    echo "<html><head>";
    echo "<title>Welcome to the future home of $a</title>";
     
  6. silvernetuk

    silvernetuk Well-Known Member

    Joined:
    Sep 2, 2002
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Hi,

    Why don't you try that bit of shtml code out it does give the domain name.

    Regards,
    Garry
     
  7. MarlboroMan

    MarlboroMan Well-Known Member

    Joined:
    Dec 7, 2001
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    I had a script somewhere that either chose the called domain name (if DNS had resolved) or scanned the httpd.conf file for a match on the appropriate domain name and displayed a generic "Web page coming soon" message with the domain name and webmaster@domainname.com address.

    If you do this in PHP - you might want to put index.html and index.htm above index.php in precedence - we've gotten support calls from people who wondered why their webpage wouldn't show - the skeleton page was still in place.
     
  8. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Nice call, Juanra. Hadn't thought of that method as I was trying to stick to no-brainers -- for the Clients benefit. I tried it though and it works as advertised.

    This method seems about the easiest and I'll just make an Addendum to my 'Welcome' eMail msg. -- to remove the "shtml" file and replace it.
     
  9. MikeHihn

    MikeHihn Active Member

    Joined:
    Aug 2, 2002
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6

    Seems to work for everyone but me. Instead of the domain name I get "localhost.localdomain"

    Thoughts?
     
  10. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Is the code is exactly as shown above and the file extension 'shtml'? If yes, the only other reasons ICTO are; the account was not setup properly, is not the main account, or is it for a Sub-domain (Parked or Add-on). Haven't tried those yet and not sure if it works.
     
  11. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Doesn't work for me, either. I'm using the .shtml extension and the exact code. I get "Welcome to the future home of host.myserver.com"
     
  12. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
  13. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
Loading...

Share This Page