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.

Domainname in default.html

Discussion in 'Bind / DNS / Nameserver Issues' started by k2tec, Dec 22, 2011.

  1. k2tec

    k2tec Well-Known Member

    Joined:
    Aug 26, 2011
    Messages:
    81
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    I made my one welcome page but I also want to place the domainname of the new domain in it.

    I think there have to stand something like this [% data.xxxxxx %]

    I searched this forum and googled for it but did not find it.
    Is there somebody how kow the answer to this question?

    Tom
     
  2. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  3. padani

    padani Active Member

    Joined:
    Apr 7, 2007
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    AUSTRALIA
    cPanel Access Level:
    Root Administrator
  4. k2tec

    k2tec Well-Known Member

    Joined:
    Aug 26, 2011
    Messages:
    81
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    Hello Ruzbehraja and Padani,

    This is not what I wanted, maybe I was not clear enough.
    But when a new account is created you get the standard cpanel welcome page, I maded the welcome page /http://www.gummimatten-kaufhaus.de/ but I have to change every customer the name of his site by hand.
    I think there must by a better way to do this
     
  5. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Ruzbehraja already gave you the answer.
    You need to rename the file to default.shtml, and then you put this line in it:
    Code:
    <!--#echo var="server_name" -->
    
    If you like you can use php instead, like this:
    Code:
    <?php echo $_SERVER['SERVER_NAME']; ?>
    
     
  6. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    If you want to know how to distribute the file and place it automatically in each users
    public_html dir, then you need to refer to: Skeleton Directory
     
  7. k2tec

    k2tec Well-Known Member

    Joined:
    Aug 26, 2011
    Messages:
    81
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    Okay thanks I did the php version it worked
     
  8. EHR

    EHR Member

    Joined:
    Apr 18, 2012
    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello everyone
    And if none of those two won't work, what should be done ?
    Testing it on a domain, works perfect but only using .htaccess rules such as
    Code:
    AddType text/html .html
    AddHandler server-parsed .html
    Options Indexes FollowSymLinks Includes
    so, when the account is suspended, these rules wont help display SSI tags. I also tried to modify the generated .htaccess when suspending account but it makes WHM to stop working (the account didn't get suspended) even the .htaccess was present including above rules and redirect to suspendedpage.cgi.
    After google-ing for 3 days and changing httpd.conf to accept .html files too (not only .shtml) still can't make it work.
    Usually I'm using a generic page but I'd like to have it specific for every user/domain and I'll try to have displayed the reason for suspension as well but later :)
    cPanel is updated with no errors:
    Code:
    [20120418.122704] Completed all updates
    => Log closed Wed Apr 18 12:27:04 2012 
    Code:
    root@S6 [~]# php -v
    PHP 5.2.17 (cli) (built: Nov 28 2011 16:59:14)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
        with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
        with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by ionCube Ltd., and
        with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
        with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
    and
    Code:
    root@S6 [~]# httpd -v
    Server version: Apache/2.2.3
    Server built:   May  4 2011 06:51:15
    The server is running LiteSpeed (if this could help).
    2nd question: is there a way to generate the .htaccess including needed handlers when suspending an account but allow WHM to really suspend user's account or having/using custom html/php pages and not default.tmpl ?
    Thank you for any useful hints !
     
  9. EHR

    EHR Member

    Joined:
    Apr 18, 2012
    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thanks for not rushing to give a solution :) Using javascript fixed this.
     
Loading...

Share This Page