Hosts file "corrected" by something
Hi! When I add lines like the following to my hosts file on the machine puddleglum: 198.162.0.201 fred.puddleglum.mylocaldomain.com fred.puddleglum 198.162.0.201 lili.puddleglum.mylocaldomain.com lili.puddleglum 198.162.0.201 lulu.puddleglum.mylocaldomain.com lulu.puddleglum something (!?!) comes along behind me and "corrects" these lines (it leaves the other lines alone) to simply: 198.162.0.201 puddleglum.mylocaldomain.com puddleglum (The reason I am putting these lines in my hosts file is to be able to access virtual hosts on my Apache web server on puddleglum from puddleglum.) BTW I'm using SuSE 8.2. Ideas? TIA! Mike Green
On Wed, 2003-05-28 at 07:59, Michael D Green wrote:
Hi!
When I add lines like the following to my hosts file on the machine puddleglum:
198.162.0.201 fred.puddleglum.mylocaldomain.com fred.puddleglum 198.162.0.201 lili.puddleglum.mylocaldomain.com lili.puddleglum 198.162.0.201 lulu.puddleglum.mylocaldomain.com lulu.puddleglum ^ ^ | | - FQDM goes here - aliases here
FQDM = fully qualified domain name. This is not correct!
something (!?!) comes along behind me and "corrects" these lines (it leaves the other lines alone) to simply:
198.162.0.201 puddleglum.mylocaldomain.com puddleglum
It did this because this is the correct syntax for hostnames. IP address FQDM aliases (as many as needed seperated by a space) Ken
Thanks! That was a case of having tried something -- but having tried it incorrectly, combined with something incorrect having worked in other situations. I had tried 198.162.0.201 puddleglum.mylocaldomain.com fred.puddleglum lili.puddleglum That resulted in Apache sending fred.puddleglum and lili.puddleglum both to the puddleglum.mylocaldomain.com home page. (Which, of course, makes sense.) And the form that I had been using, with multiple lines like the example in my original email, works fine for references to other servers, just not to references on the same server. The fact that it works obviously does not mean that it is correct ;-) So now that I understand to put the complete virtual domain name for each virtual server as an alias things are fine. And my understanding of "alias" is clarified. Thanks again!!! Cheers! Mike Green On Wednesday 28 May 2003 08:07 am, Ken Schneider wrote:
On Wed, 2003-05-28 at 07:59, Michael D Green wrote:
Hi!
When I add lines like the following to my hosts file on the machine puddleglum:
198.162.0.201 fred.puddleglum.mylocaldomain.com fred.puddleglum 198.162.0.201 lili.puddleglum.mylocaldomain.com lili.puddleglum 198.162.0.201 lulu.puddleglum.mylocaldomain.com lulu.puddleglum
^ ^
- FQDM goes here - aliases here
FQDM = fully qualified domain name.
This is not correct!
something (!?!) comes along behind me and "corrects" these lines (it leaves the other lines alone) to simply:
198.162.0.201 puddleglum.mylocaldomain.com puddleglum
It did this because this is the correct syntax for hostnames.
IP address FQDM aliases (as many as needed seperated by a space)
Ken
On Wednesday 28 May 2003 13.59, Michael D Green wrote:
something (!?!) comes along behind me and "corrects" these lines (it leaves the other lines alone) to simply:
198.162.0.201 puddleglum.mylocaldomain.com puddleglum
Am I right in thinking puddlegum.mylocaldomain.com is the machine's "official" name is, i.e. the name you set up in YaST? It's most likely SuSEconfig that changes the hosts file. You can get it to stop by editing /etc/sysconfig/suseconfig and setting the CHECK_ETC_HOSTS variable to "no"
Thanks! I have recently found out that the change you recommended is also necessary -- in addition to getting my syntax correct, as recommended by Ken Schneider in the other response to my inquiry. I.e., unless CHECK_ETC_HOSTS is set to no in /etc/sysconfig/suseconfig, SuSEconfig cleans up my hosts file and changes the line (which will appear wrapped in this email, but which is all on one line in my hosts file): 198.162.0.201 puddleglum.mydomain.com puddleglum lili.puddleglum.mydomain.com fred.puddleglum.mydomain.com to: 198.162.0.201 puddleglum.mylocaldomain.com puddleglum With CHECK_ETC_HOSTS set to no things are now working. Thanks again! Cheers! Mike Green On Wednesday 28 May 2003 08:24 am, Anders Johansson wrote:
On Wednesday 28 May 2003 13.59, Michael D Green wrote:
something (!?!) comes along behind me and "corrects" these lines (it leaves the other lines alone) to simply:
198.162.0.201 puddleglum.mylocaldomain.com puddleglum
Am I right in thinking puddlegum.mylocaldomain.com is the machine's "official" name is, i.e. the name you set up in YaST?
It's most likely SuSEconfig that changes the hosts file. You can get it to stop by editing /etc/sysconfig/suseconfig and setting the CHECK_ETC_HOSTS variable to "no"
participants (3)
-
Anders Johansson
-
Ken Schneider
-
Michael D Green