Results 1 to 5 of 5

Thread: /etc/hosts - assign domain name for shared IP hosting?

  1. #1
    Join Date
    Jun 2014
    Beans
    3

    Unhappy /etc/hosts - assign domain name for shared IP hosting?

    Hi,

    I've been trying to edit /etc/hosts as seen here as I need to access a website on a shared IP hosting, how do I do it?

    That is, I need to externally access http://www.someshop.test1/ at the IP 46.165.253.147 while when I load 46.165.253.147 in my browser it gives me another website. I've got the following setting but it doesn't work.

    Code:
    # cat /etc/hosts
    127.0.0.1    localhost
    127.0.1.1    mycoolname
    46.165.253.147  http://www.someshop.test1/
    I also cleaned my chrome DNS cache, flushed sockets and restarted the browser, but http://www.someshop.test1/ still gives me DNS lookup failed and the IP still points somewhere else.
    Last edited by whitee; June 17th, 2014 at 01:27 PM.

  2. #2
    Join Date
    May 2014
    Location
    Goa
    Beans
    61
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: /etc/hosts - assign domain name for shared IP hosting?

    try it without http://www.

    just type
    46.165.253.147 someshop.test1

  3. #3
    Join Date
    Jun 2014
    Beans
    3

    Re: /etc/hosts - assign domain name for shared IP hosting?

    Nope, it's the same.

    www.someshop.test1 IPV4 error: -105 (ERR_NAME_NOT_RESOLVED) 2014-06-17 09:12:58.859 [Expired]

  4. #4
    Join Date
    May 2014
    Location
    Goa
    Beans
    61
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: /etc/hosts - assign domain name for shared IP hosting?

    try with www except http://
    www.someshop.test1

  5. #5
    Join Date
    Jun 2014
    Beans
    3

    Re: /etc/hosts - assign domain name for shared IP hosting?

    Quote Originally Posted by rahul4557 View Post
    try with www except http://
    www.someshop.test1

    Worked a treat, thank you

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •