Skip to main content
paulk7737514
Inspiring
March 2, 2017
Question

Creating a fake host name with XAMPP

  • March 2, 2017
  • 1 reply
  • 3630 views

Does anyone know how to create a fake host name using XAMPP? Usually the site is defined as http://localhost/mydomain/  but I need to do something like this: localhost.mydomain.edu

I am trying to find the file to modify in my XAMPP set up.

    This topic has been closed for replies.

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    March 2, 2017
    Nancy O'Shea— Product User & Community Expert
    paulk7737514
    Inspiring
    March 2, 2017

    This thread seemed at little confusing as there were errors. I was hoping to find a straightforward solution where nothing was in doubt.

    paulk7737514
    Inspiring
    March 4, 2017

    By using all caps are you indicating that this is a security risk to my computer?

    Not a security risk necessarily. What if you create a virtual host called google.com? How will the browser know when you want the google.com you created and when you want the external one? If you never create a virtualhost with a TLD, you never have to worry about this issue.

    The fake hostname. . .

    Don't think of it as a fake hostname. It isn't. It's simply a domain localized to your computer.

    I assume the three X's simply refer to what ordinarily precedes localhost

    Nothing ordinarily precedes localhost. I have no idea why someone would create a virtualhost like the one you have shown.


    In order to test the CAS login from the actual university website I have to create a fake hostname on my local server that is identical to the university domain name, otherwise it will not work. And since the website will be hosted in a subdomain of the university domain name, I can replicate this setup locally using localhost.universitydomainname.edu.