LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2007, 02:12 AM   #1
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Rep: Reputation: 15
How to point "localhost" to other pc?


Hi

I have a running Apache server on my pc. I want to change
"localhost" so it will point to a dir on another pc in the local network. How to do that? Or where to look for an answer.

I tried googling this but couldn't find the right direction

Thanks.
 
Old 09-12-2007, 05:09 AM   #2
LauMars
Member
 
Registered: Sep 2007
Location: /root/
Distribution: Arch, CentOS, Debian, FreeBSD, Slackware, Solaris, SuSE (Open & SLES)
Posts: 115

Rep: Reputation: 25
Quote:
Originally Posted by kairen View Post
Hi

I have a running Apache server on my pc. I want to change
"localhost" so it will point to a dir on another pc in the local network. How to do that? Or where to look for an answer.

I tried googling this but couldn't find the right direction

Thanks.
you need to edit your hosts file: /etc/hosts
just replace the loopback IP number with your destination PCs IP number.

this should work right way
 
Old 09-12-2007, 05:13 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You don't want to do this. Localhost should just refer to the local machine. You could break interprocess communications , pipes and other things.
 
  


Reply



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
Why "bash-2.05b$" in Terminal instead of "username@localhost username" jayelitumbiolo Linux - General 9 10-04-2009 03:16 AM
Trying webmin, getting "attempt to connect to 127.0.0.1:10000 (localhost) failed" jeffreybluml Linux - General 1 08-16-2007 11:16 AM
DNS error : "localhost.zone file not found" rajat Linux - Server 2 04-25-2007 11:26 PM
make "localhost" point to a subdirectory of Apache server oudent Linux - Networking 2 07-21-2005 07:37 PM
/var/log/messages contains "localhost" instead of the real hostname allel Linux - Networking 0 07-15-2002 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:13 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