View a virtual host website pre-DNS

Discussion in 'General' started by kilkenny, Jun 5, 2018.

  1. kilkenny

    kilkenny New Member

    I would like to view a virtual host website on the web via a direct path before changing the DNS such as


    to distinguish between different websites on the same server. To be clear I only have one IP, multiple website folders.

    I am able to do this on my current server with a different control panel. On the new server I used The Perfect Server tutorial for Debian 9, Apache, and ISPconfig 3.1. I have not done anything past the tutorial besides "Add a Website" on ISPConfig.

    What is the direct path to view a virtual host pre-DNS with ISPconfig?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. kilkenny

    kilkenny New Member

    Yes, I've read that, I don't see how that applies if I want to view content installed into VirtualHost1 folder and VirtualHost2 folder
  4. kilkenny

    kilkenny New Member

    I can't even use that trick to go to "" folder because I can't figure out the path to it with ISPconfig in the way. That trick as far as I can tell only helps me access the IP's root folder. I have content set up in "" and "" I'm trying to test without a DNS
  5. kilkenny

    kilkenny New Member

    Basically how do I actually view "" which is a symlink to /var/www/clients/client0/web1/index.html on the server. Without the web accessible path setting the hosts file to go to the IP does nothing for me as it goes to the IP's root folder...
  6. Ghostdare

    Ghostdare Member

    Follow Till post. Edit host file from your computer.
    And basically, I do not understand why you create a symlink for to /var/www/clients/client0/web1/index.html - why don't you use a site redirect in website options.
  7. kilkenny

    kilkenny New Member

    Huh? If I "add a website" on ISPconfig for ILOVEIRELAND.COM and ILOVEAFRICA.COM it automatically creates symlinks as follows

    var/www/ ---> /var/www/clients/client0/web1/web
    var/www/ -->/var/www/clients/client0/web2/web

    I didn't add any symlinks, ISPconfig did that. For the above example, cPanel will allow you to do: --> IP root html folder --> /var/www/html/ --> website --> var/www/clients/client0/web1/web --> website -->/var/www/clients/client0/web2/web

    Which means that I can access multiple websites as a virtual host on one server IP. In a testing environment. Without pointing a domain name.
  8. Ghostdare

    Ghostdare Member

    That is correct, ISPConfig does that... it's the way it works.

    Create as many sites that u want and edit hosts file. then in a browser write the domain name of the sites and you will see them.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    And that's exactly what is achieved by doing this:

    so just follow the instructions. And in opposite what cPanel does, this really works for all sites incl. CMS based sites that use WordPress.
  10. kilkenny

    kilkenny New Member

    The feature on Cpanel is different. It has a publicly accessible URL so that multiple people can access without all manually changing their hosts file. It's also a great feature because you can run mobile tests in test...not sure how you would change hosts file on an iPhone :mad:
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    What cPanel does may work for small sites without a CMS, but it won't work for any complex site that uses rewriting or even WordPress, so no internet professional would ever useon such a path based access for testing. The only way to access a namebased site before DNS delegation as if it would be the live site is to use the hosts file on the client system.

    To access sites from devices were you can't access the hosts file, you can use the website auto alias function in ISPConfig, see System > server config > web or ISPConfig manual page 283.
  12. dmgeurts

    dmgeurts Member

    For dev testing from mobile devices. Though technical, you could use a wireless network with poisoned DNS, or use an emulator on your desktop?

    I second what Till says, any redirects htaccess or otherwise would likely not work.
    till likes this.

Share This Page