How to access a site by IP?

Discussion in 'Tips/Tricks/Mods' started by jchelquer, Feb 9, 2010.

  1. jchelquer

    jchelquer New Member

    I am using ispconfig3 and need to test a site before pointing the domain effectively to the new place. I don´t find any way to access a client's site by ip, as I used to do in regular hosting sites. Any Idea?
     
  2. edge

    edge Active Member Moderator

    You can not access the site by IP.
    What you could do is add the site to your workstations hosts file, and access it that way.

    The hosts file (for Windows) can be found in: \Windows\system32\drivers\etc\

    example:
    192.168.1.1 www.the-domain-in-question.com
     
  3. jchelquer

    jchelquer New Member

    Thank you

    Yes, this seems to be the solution. Thank you!!
     
  4. xxfog

    xxfog Member

    It is a solution, but not a real nice one i think.

    Couldn`t ISPConfig be changed in a way that Domains in form like

    username.MY-ISPConfig-Server.TLD work same as www.THE-Domain-OF-THE-User.TLD?

    This would be perfect if you provide Webdesign and want to "show" the user the new homepage without buying a domain for him.
    sorry for my bad english.
     
  5. BorderAmigos

    BorderAmigos New Member

    Your system is usually going to check the /etc/hosts file before going to an external nameserver. This means you can name the site anything you want. If you put

    127.0.0.1 www.microsoft.com

    Then even that name would point to your localhost. I currently have 2 servers on my local (10.0.0.0) network. The one that is forwarded to the outside world is at 10.0.0.100. The other is at 10.0.0.200. I put the site names for the one at ...200 in the hosts files and I can access them on the internal network but not from the outside world. I run the SSH on both servers on different ports so I can access that from outside via IP address.

    The point to all this being that you can put the clients (or anyones) domain name in your hosts file and have it work without having to actually buy or register the domain name.
     
    Last edited: Feb 22, 2010
  6. collickb

    collickb New Member

    So an IP-based URL path to a site is impossible?

    I'm just finishing up the perfect server instructions for Ubuntu 9.10... I can see the index page for IP address x.x.x.x and ispconfig3 created a symlink for my first site (site1.tld); so that seems strange that x.x.x.x/site1.tld/ wouldn't work.

    That said, I just signed up to the forums because I'm getting a 403 error at x.x.x.x/site1.tld and I'm wondering if it is actually something I can fix after reading this thread. Am I overlooking a permissions setting or is this something that is purposely impossible?
     
  7. BorderAmigos

    BorderAmigos New Member

    You shouldn't be typing the ip address. There may be an .htaccess file there that forbids directories. What happens when you just type in the domain name (site1.tld) ?
     
  8. collickb

    collickb New Member

    For a similar reason as the original poster, I don't have the domain (site1.tld) pointing to this server. In fact, my goal is to replace the server the domain is pointing to with this new server.

    without pointing the domain, would it be impossible to access, say, a cms configuration wizard or some other tool that requires browser access?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no need to access a site by IP for this reasin as you can simply add a line with:

    ip www.domain.com

    to the hosts file on your workstation. This works on Linux, Mac and Windows.
     
  10. collickb

    collickb New Member

    till, that's what I'm currently doing, from the instruction earlier. I use various workstations, though, and was hoping there'd be a single, universal workarounds instead of multiple, location-specific ones.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    If you use a local DNS server in your network or a router with dns functions, you can use that to override the normal dns server for that domain too for all workstations in your network.

    Another option is to add a temporary domain or subdomain to the website and use this during development.
     
  12. xxfog

    xxfog Member

    As I already wrote in my earlier posting: it is a solution to change the host-file but it`s not a userfriendly solution.

    I have same problem since weeks, I move all users from a confixx-server to a new ispconfig based server.
    If I want to check if the "move" was successfull, I have to edit my hosts-file. If a user wants to see a new-homepage I created for him (and he wants to buy or move a domain pointing to my new server not until he likes the new website well) I have to tell him to change his hosts-file.
    This is unprofessional and most users don`t even know, that there is a hosts-file on there machine and waht this file does.

    The easiest way to set up a new user with webspace and website would be (like it is in confixx) username.my-server.tld point to the same website, that www.username.tld would do.
    Is it so hard to code that feature?
     
  13. edge

    edge Active Member Moderator

    An other way to do this is to creat the clients website like normal, and make a symlink from it to the 1st website that you setup on the server (ie: the website that you see when accessing your ISPconfig server by IP)

    Now you can access the "clients" website by http://the_ip_of_server/the_name_of_symlink
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Or you just add a temporary aliasdomain (subdomain) to the website.
     
  15. Nicram

    Nicram Member

    Is it any way to make it automatically for every new created website by customers?

    For example using hxxp://mydomain.tld/customer.domain.tld/ ?

    It is really missing thing in ispconfig, so users/clients may access their websites before they got own domain.

    Not so long ago, i had to transfer about 90 accounts to ispconfig, and making dns entry for every user was pain, and it isn't high number.

    Yrs but we also have to create dns A record for every useres. It is problematic if i use for that other server (for my own domain), especially if it is not automatic or web administrated DNS server.

    Ah and changing DNS server or host files of XXX users that using accounts is just, impossible :)
     
    Last edited: Mar 17, 2010
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    We did not implement this symlink solution as it does not work reliably and it can not work reliably for technical reasons. What you see trough the symlink is not the same vhost that you get later when the domain is delegated. So if the site works or not later can not be determined by accessing the files trough the symlink. Only really simple sites with html files will work reliably. The reason for this is that the symlink uses the settings of the default vhost which are different from the settings of the vhost that is used for the real domain. So if your customers tests the site trogh the symlink and it does not work, there is a chance of about 80% that it is related to the fact that you accessed it trough the symlink and not trough the real website. And if you fix these problems then and the site displays fine trough the symlink, it will be broken when you access it later trogh the domain.

    The only solution that will eork reliably is to add a temporary domain or check the site by changing the hosts file. By the way, I migrated a lot of sites using the hosts file method, works fine. Just leave the editor with the file open, type in the domain, test it and then go to the next one.
     
  17. Nicram

    Nicram Member

    Well i think, subdomains are best option. But afaik ispconfig do to make them automatically, and do not have option to choose what domain to use for that (he also had to got option to automatic adding A and MX records in the domain zone i think).

    Maybe it's good thing to implement in future releases :)
     
  18. simbu

    simbu New Member

    I found the ip address here http://www.ip-details.com/ It provides ip address,ip search,domain host search,get ip details....
     
  19. Poliman

    Poliman Member

    I can't use /etc/hosts file, because I can't see client's website on server version of Linux.
    I found something interesting https://git.ispconfig.org/ispconfig/ispconfig3/issues/1280. Marius burkard said there that this feature is implemented:
    System -> server config -> web -> website auto alias
    But no idea how to use "Website auto alias" option.

    This feature could be nice from section "Loading your site in the browser": https://mediatemple.net/community/p...st-or-preview-my-website-before-switching-dns
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    It's described in the manual. But the best way to access a website for testing is to edit the hosts file anyway: https://www.faqforge.com/linux/cont...ess-a-namebased-website-without-a-dns-record/

    This won't work with most current websites or cms systems, so it makes no sense to implement something that is known to be broken by design.
     

Share This Page