Resolving URLs to IP addresses (SOLVED)

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
pmanger
Level 1
Level 1
Posts: 24
Joined: Mon Feb 04, 2013 6:30 pm

Resolving URLs to IP addresses (SOLVED)

Post by pmanger »

I am running Linux Mint 14 Cinnamon 64-bit in a dual-boot configuration with Windows 7 Pro 64-bit. The computer is part of a local area network. Another computer on the network is a Windows XP (32-bit) machine that is running an Apache 2 server, which I use to serve several test webpages. Here is my problem: I need to be able to access these webpages from a web browser running on Linux Mint, but I have to access them by URL. If I use the IP address, I only get the first webpage listed in the other machine's Apache vhosts.conf file. When I am running off of Windows in my dual-boot machine, this is no problem. To access a webpage on another computer on the LAN by URL, all I have to do is add (for example) a line to the C:\Windows\System32\drivers\etc\hosts file:

192.168.1.9 pmtest.com

where the first term is the local IP address and the second is the URL. If I do the same thing in the /etc/hosts file in Linux Mint, it has no effect.
So, what am I missing?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: Resolving URLs to IP addresses

Post by DrHu »

Well, the hosts file should work..
https://en.wikipedia.org/wiki/Hosts_(file)

http://www.accs-net.com/hosts/hostsforlinux.html
http://practice.chatserve.com/hosts.html
http://www.brighthub.com/computing/linu ... 72007.aspx

I would recheck the contents and see that it is the same or very similar to the windows one, except of course the paths will be different as the Linux client is not goring in exactly the same direction and with the same names as the windows client..
pmanger
Level 1
Level 1
Posts: 24
Joined: Mon Feb 04, 2013 6:30 pm

Re: Resolving URLs to IP addresses (SOLVED)

Post by pmanger »

My bad! All I had to do was reboot after adding the lines to the /etc/hosts file.
Sorry for wasting everyone's time. (And thanks for the quick response! This forum ROCKS!)
Locked

Return to “Networking”