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.

Temporary url of any account redirect to root account

Discussion in 'General Discussion' started by psytanium, Jun 26, 2014.

  1. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm running a VPS server, I created an account "testacc", to try the temporary url usage, I leave it empty without any content.

    Temporary url to "testacc" should be like this according to my hosting provider:
    http://198.x.xxx.xx/~testacc/

    When I open the temporary URL, it redirect me to the root account, I mean it load the content of the root user.

    I discussed this problem with the hosting support, they are unable to solve it.

    Seems to be a frustrating problem. this was the last reply from my hosting support.

    Please I need your help.

    Thank you.
     
  2. SS-Maddy

    SS-Maddy Well-Known Member

    Joined:
    Mar 28, 2009
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    This may be due to the absence of "mod_userdir protection" . Also if the server is running FastCGI as PHP handler, it is not possible to run PHP files via temporary url such as http://SERVER_IP/~username/index.php . But you will be able to view HTML files. Make sure that the IP used in the URL is confgured for shared hosting using the directive "Name VirtualHost"
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Try updating the hosts file on your computer so that it points the domain name to the IP address of the new server. This will allow you to visit the domain name directly in your web browser before propagation occurs.

    hosts (file) - Wikipedia, the free encyclopedia

    Apache Mod_Userdir can sometimes conflict with certain configurations or Mod_Rewrite rules.

    Thank you.
     
  4. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    mod_userdir protection was not enabled, i turn it on and tried to access again, same result, it will load the content of root user.

    also i uploaded a plain text tohttp://198.x.xxx.xx/~testacc/ok.txt but same result, the root account load.

    thank you for pointing me to the mod_userdir protection as i'm completely new here. if you have more possibilities let me know please.

    - - - Updated - - -

    Well, i need to load the content on my clients computers. but i tried your suggestion, i added this line to the host file in windows: # 198.1.124.74 testacc.com

    also didn't displayed the content. something wrong ?

    - - - Updated - - -

    i don't know i feel this is the reason, can you explain more ? can i configure it from the WHM GUI ?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You should not have the "#" symbol in the entry. That disables the entry.

    Thank you.
     
  6. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    it worked, i just disabled the "mod_userdir protection" after enabling it for few minutes.

    Don't know was happened exactly, anw thank you.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,724
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page