TurnKey Linux Virtual Appliance Library

Access Server by Hostname

Apologies in advance for this basic question. I have installed the Turnkey Linux Redmine Appliance and all is working very well. The only thing I'd like to do is access it via a Hostname instead of its IP Address. I have it installed in a Virtual Box VM on a Windows PC with Windows PCs on the Network.

From what I can see the Hostname is redmine, however if I use http://redmine in my browser I get 'cannot display page' in IE and am taken to www.redmine.com in Firefox.  Further I can't ping redmine.

I've also triied assigning a Hostname in Webmin | Config | Ports and Addresses without success.

I've searched the forums and Google'd but not resolved this so far. I am not a Linux/Unix guy and plod my way through these things which are probably quite simple for this with the appropriate knowledge.

Jeremy's picture

Have a look at this thread

here and see if that answers your question. :)

Thanks, I had seen that. I've

Thanks, I had seen that. I've set up the Turnkey Config to use a Static IP and in my Router mapped a Hostname to that Static IP using the Virtual Server | Static DNS Configuration settings but that doesn't work.

From your reply in the other thread it sounds like you suggest giving up on using a hostname and just using the ip address?

I've used FreeNAS for quite some time and was always able to access it via its Hostname, without doing anything in the router.

Update: It is working after all - I guess I needed to be a little more patient. Thanks.

 

Neville Franks, Author of Surfulater

Jeremy's picture

Glad you got it sorted

In that other thread I was suggesting that in that person's instance that he set a static IP. Assuming adhoc WINS wasn't working (as it seemed it wasn't) then unless he was going to set up a WINS or DNS server that yes; he may need to just use the IP. As you have a static IP that thread doesn't exactly apply to you (sorry about that) but I thought it may be close. Obviously not!

In your instance hopefully it just took some time to propagate the hostname via adhoc WINS. I hope that that it continues to work out for you. Your previous experience with FreeNAS suggests that it might.

As I said in that other thread, in my experience; adhoc WINS networks are often problematic (and intermitant) with a cconsumer grade router. Hopefully you're lucky though and your router is correctly forwarding the WINS hostname(s). I have also overlooked the possibility that you already have a WINS server in your network (are you running any Win Server OS?) If so you should be right.

Because you have a static IP, if you find that it does become intermitant, one solution is to add an entry to the hosts file on each PC. It's a bit painful (repetative) to set up if you have a large network but once in place it's very reliable. To make it easier you could configure a script to add the entry and run it once from each PC.

Setting up a TKL VM as a DNS server is pretty easy too.

Thanks for the follow up

Thanks for the follow up post. The Router solution continues to work fine this morning, which s great. I always have the fallback to using the IP as well as your hosts file suggestion. I am not running a Windows Server.

An article on setting up a DNS Server would be of interest. I do realize this isn't a TKL specific thing. Us Unix luddites need somewhere to turn.wink

With FreeNAS I didn't have to do any Router changes to access it via its hostname, so I assume it runs a DNS Server or some such.

Neville Franks, Author of Surfulater

Jeremy's picture

DNS is not too hard to install

This should do the trick:

apt-get update
apt-get install bind9 dnsutils rblcheck webmin-bind8

It should work on the both the current TKL releases and the TKL Lucid based beta (you may need to add the TKL hardy repo to install the Webmin module). dnsutils and rblcheck are not strickly required but they have some handy troubleshooting tools should you need them so I like to have them installed. If you don't want to install them, then just excluded them from the second apt line above.

For more info have a look at the DNS section of the 8.04 Ubuntu Server docs or the 10.04 Ubuntu Server docs for the current TKL release and the TKL Lucid beta respectively.

Thanks, if/when I have time &

Thanks, if/when I have time & motivation I might give this a shot. The Redmine TKL does include Webmin.

Neville Franks, Author of Surfulater

using static ips and hostnames...

if your speaking of using your static ip on your local (lan) network and want to reach it by name then the setting you have in your router might work as long as it is the default gateway, your pointing to it for dns, and it is (the name you want to use) not a fqdn as dns will usually want to resolve to the fqdn first. However, if your wanting to reach this device from someplace outside of your network you need to use an external dns service (authoritative) and have them point the appropriate record ptrs (a, mx, ns) for www or mail or whatever to your static ip.

 

fqdn = fully qualified domain name

Thanks Richard. I've set

Thanks Richard. I've set redmine.home in the router and that is working fine. I do use dyndns.com to enable remote access, so I have experience with that. In this specific case remote access isn't needed. In fact running Redmine locally maybe temporary. I've been running it for several years on my Web Server, but the Redmine setup has gone belly up and in the interim running it using TKL locally has saved the day.

Neville Franks, Author of Surfulater

Jeremy's picture

Sounds like your router is better than average!

If you can set hostnames in your router then you shouldn't have any problems in the future.

Well it appears as though the

Well it appears as though the router isn't quite as good as I first thought. Two PC's (using WiFi) work fine using the Hostname, however a third which is my main Dev PC (wired LAN) doesn't. I've added an entry to its Hosts file, which resolve the issue.

So your thoughts on sticking with the IP address come back to the for.

I actually use an app to log me into these Web sites, so I don't even have to enter a URL. So this whole thing isn't such a big deal anyway. However ... ;-)

Neville Franks, Author of Surfulater

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)