Re: default indexing target

Robert Ribnitz <[email protected]>
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>
Lachlan Andrew wrote:

>Greetings Robert,
>
>I think I'm missing something here.  Currently, if the  start_url  (or 
>any subsequent link) specifies a numeric URL, then that is what 
>ht://Dig uses.  It seems to work on my system (192.168.0.29).  It 
>also works if I use the  start_url  as  http://tower/  even though
>    host tower
>fails.
>
>What do you suggest the options should control?
>
>If you particularly want to use numeric addresses for non-global IP 
>addresses, how about something along the lines of
>
>    host=`hostname -f`
>    if  host $host | grep 'not found' > /dev/null
>    then
>        host=`ping $host | head -1 | sed 's/[^(]*(\([^)]*\)).*/\1/'`
>    fi
>    sed "s-start_url:.*-start_url: http://$host/-" < htdig.conf > Tmp
>    mv Tmp htdig.conf
>    
>I think that should find the appropriate name of the local host -- if 
>the symbolic name can be found, then it will use that.  Otherwise, it 
>will use the numeric address.
>
>Is that the sort of thing you are after?
>
>Cheers,
>Lachlan
>  
>
Suppose you install it in a shared hosting environment. There will still 
only be one machine, but with multiple ip addresses (and hostnames).

www.customer1.com and www.customer2.com point to the same (physical) 
machine, but use different IP addresses.
for this reason a default like you point it out cannot work (or rather, 
will fail in such circumstances). It is imaginable that in such 
circumstances, we would have one ht://Dig installation with different 
config files for every customer.

We therefore need to ask for the hostname to use, bearing in mind there 
may be multriple.

What you point out (tower resolving to 192.168.0.29) is a feature of  
your local dns config (you might have bind configured that way, or have 
it in /etc/hosts) is a behaviour we cannot rely on. I don't know how it 
would work in a BSD-like envirnoment, or with MacOS..

What I therefore propose to do (for debian at least) is to use debconf 
to handle this, and to ask the user what they want. Whether the same 
mechanism can be used outside debian I am usure, since I don't know how 
portable debconf is.

Robert



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
ht://Dig Developer mailing list:
[email protected]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.