LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-07-2016, 01:43 PM   #1
kb2tfa
Member
 
Registered: Oct 2006
Location: New Jersey
Distribution: CentOS
Posts: 175

Rep: Reputation: 18
DNS and Local Vhosts


I think my DNS looks on the internet before local because when I edit my /etc/hosts file 10.0.0.2 wordpress.local it searches google. This is a Fedora 23 machine. I have CentOS 7 machine that look locally first. What should I be looking to edit to fix this?
 
Old 02-07-2016, 03:06 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Open /etc/nsswitch.conf and make sure that you have files first in the hosts line:
Code:
hosts:          files dns
Regards
 
1 members found this post helpful.
Old 02-07-2016, 06:52 PM   #3
kb2tfa
Member
 
Registered: Oct 2006
Location: New Jersey
Distribution: CentOS
Posts: 175

Original Poster
Rep: Reputation: 18
thank you.
 
  


Reply

Tags
dns



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect local DNS query to remote DNS server on non standard port? rock_ya_baby Linux - Server 8 04-13-2010 04:31 AM
Error an not ping vhosts server from my local machine mbedzymt Linux - Newbie 1 03-30-2010 03:39 PM
vhosts for IRC->IPs->DNS? question Belize Linux - Networking 1 01-24-2004 11:05 AM
apache + dns + vhosts albertos Slackware 1 08-03-2003 07:03 PM
Will Httpd vhosts work with anothers DNS? paradoxlight Linux - General 1 02-02-2002 08:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration