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.

/~username directs to hostname

Discussion in 'General Discussion' started by Secret Agent, Jun 7, 2006.

  1. Secret Agent

    Secret Agent Guest

  2. bmcgrail

    bmcgrail Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    I ran into this problem a while back. Someone uploaded porn via IP to an unsecure script and leached a 100 gigs of bandwidth in a day bypassing the bandwidth limits of the account that had the unsecure script.

    I was too lazy to research why mod_userdir wouldn't turn off. Instead I left mod_userdir on and change the UserDir from:

    UserDir public_html

    to

    UserDir somefakedir_html

    which gives them a simple site not found

    I also found that going to http://ipaddress brought up the first virtual-host's website. Something resellers don't want. So I added a subdomain of iponly.mybox.com and moved it to the first position in httpd.conf then added an index.html which says "You can't access your website by IP Address, contact your hosting provider if you are having problems."
     
  3. randomuser2

    randomuser2 Member

    Joined:
    Dec 23, 2005
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
  4. bmcgrail

    bmcgrail Well-Known Member

    Joined:
    Dec 8, 2003
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    I might have read your post wrong. Looking at it again makes me think a mod_rewrite condition is taking place. the IP address should remain in the URL.

    Check .htaccess files in /usr/local/apache/htdocs and also in the directory of the 1st virtual host listed in your httpd.conf file. And of course look for rewrite conditions in the httpd.conf file too.
     
Loading...

Share This Page