Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Create a custom temporary URL on account creation

Discussion in 'cPanel Developers' started by Ian Svoboda, Jan 11, 2018.

Tags:
  1. Ian Svoboda

    Ian Svoboda Member

    Joined:
    Mar 19, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jacksonville, FL
    cPanel Access Level:
    Root Administrator
    I'm aware that cPanel includes a temporary URL that uses the server IP address (http://{$service_server_ip}/~{$service_username}/). I'm interested in setting up a temporary URL that uses a custom domain that I own instead.

    Example:
    {$service_username}.mydomain.com

    If someone has any experience setting up something like this or can point me towards some resources I'd really appreciate it.
     
  2. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    262
    Likes Received:
    6
    Trophy Points:
    168
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    May be you can use the skelldirectory with a custom php script, that will redirect the newly created domain name to your landing domain name.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Ian Svoboda

    Ian Svoboda Member

    Joined:
    Mar 19, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Jacksonville, FL
    cPanel Access Level:
    Root Administrator
    Hey cPanelMichael,

    Thanks for your reply. I've been going through the documentation and I admit I'm still a little confused. I have a few specific questions that I"m hoping you can help me with:

    1. If I want to write the hook in PHP, where should my action code file be placed?
    2. What would be the best way to figure out the structure of data available to me in the hook? For instance, if I want to get the username of the account that was just created, how could I access that data?
    3. Would it be best to mark the Park call via the LiveAPI, since I'm using PHP to write the hook?
    4. In the hook example for PHP, I found, there are some echo commands early in the hook. What is the purpose of the echo here?


    Thanks again for your help. Any additional information would be most appreciated.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi @Ian Svoboda,

    It's a good idea to first confirm the specific actions you'd like to have occur automatically at the time of account creation. Could you manually setup an Alias using the cPanel UI after the account is created and verify that's the only action that's required upon account creation? If so, let us know and we can proceed to provide you with more information, as it's likely a simple bash script is going to be easier to setup than a custom PHP script.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice