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 website url

Discussion in 'General Discussion' started by mhugo, Mar 28, 2010.

  1. mhugo

    mhugo Member

    Joined:
    Mar 28, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    My brain must have sneaked away when I was sleeping.

    Im trying to get xxx.xxx.xxx.xxx/~user to work as temporary url, but cpanel just says it cant find it.

    The users exists and i can access the site from going to his domain name.

    What have I disabled?
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Please make sure that you have not disalbed the mod_userdir from WHM for the domain. You can check it from WHM --> Security Center --> Apache mod_userdir Protection.
     
  3. mhugo

    mhugo Member

    Joined:
    Mar 28, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I excluded the default host from the protection and it worked.

    Thnx
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Side footnote, you can't use mod_userdir with non-DSO (php) based servers.

    For these, either assign a dedicated IP to the account using the IP number as the "temporary address" or assign a subdomain as a parked domain of a valid domain already on the server.

    Don't use http://x.x.x.x/~username type of addresses with these!
     
  5. spellinn

    spellinn Member

    Joined:
    Jan 3, 2002
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Can you explain why not?

    Thanks


    Neil
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Absolutely! When you access a site under a DSO based server,
    the scripts are executed as the user "nobody" so the permissions are the same whether the visitor accesses the site by hostname, by IP address, or from some other site or hostname using mod_userdir (~username)

    Under non-DSO servers (preferred for security and many other reasons), all scripts are executed on sites as the user owner which works find by direct domain address or IP but becomes problematic if you attempt to access sites by some other hostname, site, or account via mod_userdir means because the scripts will attempt to be executed as the effective ID of the site from which you are originally calling instead of the username of the owner and this is when the permission and ownership problems begin.

    Mod_Userdir was ill conceived from the beginning and I don't recommend using it irregardless of what kind of server you have but in the case of non-DSO servers, you got more reasons to avoid using it.

    For those who don't have their domain attached yet and need a temporary address, I would recommend parking a subdomain of another domain already active on the server on top of the account to act as a temporary address if you are unable to assign a dedicated IP address.
    For those comfortable with httpd.conf editing, this is much better done by means of a "ServerAlias" in the virtualhost section for the site but could also be done by a simple subdomain parking on top of the account.
     
Loading...

Share This Page