Si8
Si8

Reputation: 9235

XAMPP setup to use name instead of IP address

I have an internal network for our company and in one of the server I have XAMPP/Apache setup and have my own website.

I access that page from a browser anywhere within a network by entering the following address:

http://10.10.239.306/MyPage/testpage.php

I am trying to change so that instead of the IP (which is hard to remember) the user can enter, say for example:

http://hweb/MyPage/testpage.php

I followed the online instruction and did the following update on the server hosting the pages:

in the C:\Windows\system32\driver\etc\host file I added:

127.0.0.1 hweb

in the C:\xampp\apache\conf\extra\httpd-vhosts.conf file I added:

<VirtualHost *:80>
    ServerName hweb
    ServerAlias myname
    DocumentRoot c:/xampp/htdocs/MyPage
</VirtualHost>

When I enter http://hweb/MyPage/testpage.php in my browser, I get a Internet Name Resolution Error (dns_server_failure) error

I did restart the Apache server twice.

Does anyone know what I am doing wrong and how to fix it?

Upvotes: 2

Views: 15938

Answers (2)

alandarev
alandarev

Reputation: 8635

Internet Name Resolution Indicates that your browser does not know the IP of hweb. I.e. you did not edit the hosts file on the client machine (the one which tries to access)

Please verify you have 10.10.239.306 hweb in C:\Windows\system32\driver\etc\host on Client machine.

Upvotes: 1

fast
fast

Reputation: 37

try to change the listen 127.0.0.1 hweb, check following link; http://sustainablewebdesign.com/book/resources/xampp/

Upvotes: 1

Related Questions