hostname redirected to loopback

Michael Sweet mike at easysw.com
Thu Jun 8 15:51:47 PDT 2006


angelb wrote:
>> angelb wrote:
>>> I apologize for posting and reposting. My previous messages was being
>>> posted in pieces. Hopefully this time works.
>>>
>>> Anyway, a portion of my hosts file follows:
>>>
>>> 127.0.0.1  loopback localhost
>>> .
>>> .
>>> 10.10.1.1  dev101   # CUPS test server
>>>
>>> I used this same server, dev101, to install and test CUPS 1.1.23
>>> without any issues I see from CUPS 1.2.1 now.
>>>
>>> Also, why would only the Printing feature from the web interface
>>> is reacting this way and why not the others; Admin, Jobs, etc?
>> Printer URIs get rewritten by the CGI programs, but the other links
>> are just relative/absolute paths so they don't have the same issues.
>>
>> Basically, the code looks at the address portion and compares it to
>> the server name that is passed in - if they match, then the URI is
>> rewritten to be /printers/foo.  Otherwise you get the full URL
>> (http://address/printers/foo).
>>
>> --
> 
> How does printer_uri_supported gets assigned its value? Is it via ServerName or something else? If I understand you correctly, it's
> read in from ServerName.
> 
> I noticed that when I comment 127.0.0.1 from my hosts file, I'm then
> able to access objects from Printers without being redirected. Taking
> the comment out redirects me back to loopback. It appears to me that
> somehow the /etc/hosts file is being reread, or at least that's what I
> see.
> 
> Sorry if I'm taking this too far; I just want to understand it and see
> if it's the way I configured CUPS, my environment, or something else.

cupsd passes the SERVER_NAME based on the address you connected to.
It does a reverse lookup and uses the first name it finds, so I'll
bet if you swap loopback with localhost in your hosts file, that
will fix things...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list