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.

Accessing new name based sites

Discussion in 'General Discussion' started by Networkologist, Mar 15, 2003.

  1. Networkologist

    Networkologist Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    After setting up a new account that either still resides on a different host and the name servers haven't been changed yet or does not want to go live and hasn't entered name servers, viewing the site as:

    http://123.456.78.9/~username/ doesn't display images if they are stored in an images or whatever folder.

    Is there any other way to view a new account and test the setup completely; cgi scripts, etc.?
     
  2. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Depending on how the images are being called that could be normal behaviour. For instance:

    <img src="/images/logo.png">

    would correspond to:

    http://123.456.78.9/images/logo.png

    which is not where the image is.

    You might create a subdomain of your domain and make its DocumentRoot be your user's DocumentRoot.
     
  3. Networkologist

    Networkologist Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    That's generally the case, in my experience. /dir or../dir

    Sorry, but I don't follow :(
     
  4. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    Ok, suppose your domain is yourisp.com

    Now from yourisp.com cpanel you create a temporary
    subdomain for your customer, say username.yourisp.com.

    Now open httpd.conf with your text editor and search for username.yourisp.com. You'll see something like this:

    DocumentRoot /home/yourisp/public_html/username

    Change that to:

    DocumentRoot /home/username/public_html/

    and restart apache. Your customer can now use username.yourisp.com to test his/her web pages. Don't forget to remove the subdomain when the DNS change is done (unless you give free bandwidth, of course ;) ).
     
Loading...

Share This Page