LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   My hostname is NOT resolving correctly (https://www.linuxquestions.org/questions/linux-networking-3/my-hostname-is-not-resolving-correctly-580501/)

cucolin@ 08-28-2007 03:11 PM

My hostname is NOT resolving correctly
 
Last night I installed Apache,Mysql and php in my Fedora box for testing/studying purposes. I changed my hostname to "fidel", but when I type fidel at the browser it takes me to a wiki page about fidel castro. How do I resolve this? Do I need to setup a DNS server also? thanks

acid_kewpie 08-28-2007 03:35 PM

you have no dns. the client isn't going to magically know what the server is called. if you want a simple dns implementation, i'd strignly recommend dnsmasq for a 2 minute setup.

ilikejam 08-28-2007 04:14 PM

You can edit /etc/hosts and add the IP/hostname there.

Dave

cucolin@ 08-28-2007 04:31 PM

I'm looking at it:

# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost
127.0.0.1 localhost

Can you give me an example of how should I edit this? thanks!

unSpawn 08-28-2007 05:07 PM

Quote:

Originally Posted by cucolin@ (Post 2873843)
Can you give me an example of how should I edit this? thanks!

In your case "fidel" is an alias for the machine. "man hosts" (try that in a terminal window) says: "IP_address canonical_hostname aliases", your example: "127.0.0.1 localhost fidel".

cucolin@ 08-29-2007 10:22 AM

Thanks for the info. unSpawn! I will try this tonight.


All times are GMT -5. The time now is 06:38 AM.