Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a php site running on a local XAMPP web server. I would like to be able to access the site from multiple devices (other desktops, laptops, iPad and Android tablets) running on the same LAN by using a name/alias (e.g. myapp.local) instead of by IP address.

Using hostname works but only on the Windows devices because of netbios name resolution but I can't use hostname on the iPad or Android devices.

My searching so far seems to suggest I have to setup my own DNS server. I've tried doing this with MaraDNS following the instructions here but I need something where I don't have to modify the router settings.

I only want to install stuff on the computer hosting the web server and not edit host files or anything like that. Is there anyway to do this in as simple a way as possible so on any computer/device I can enter something like myapp.local and it resolves correctly?

share|improve this question
1  
Looks like you should consider a service like dyndns. Here's a guide. –  Jasjeev Singh Feb 17 at 20:56

1 Answer 1

I don't have a good answer on how to do it without dhcpd/dns but since I can't comment I'll point you into the zeroconf direction, also zeroconf with mDns.

Personally I went with a home server and setup bind and dhcpd.

My router is a fritz box. I turned off FB's dhcpd so I could set the nameserver by dhcpd.

dhcp.conf

# option definitions common to all supported networks...
option domain-name "fritz.box";
option domain-name-servers 192.168.178.2;
default-lease-time 864000;
max-lease-time 1123200;
authoritative;
log-facility local7;
subnet 192.168.178.0 netmask 255.255.255.0 {
  range 192.168.178.21 192.168.178.100;
  option routers 192.168.178.1;
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.168.178.255;
  option ntp-servers 192.168.178.1;
}

192.168.178.2 is my homeserver 192.168.178.1 is my router my router also has a ntp server running

as for bind, this is what a wildcard tld zone config looks like pri/server.zone

$ORIGIN .
$TTL 3600
server  IN SOA server.fritz.box. hostmaster.localhost. (
                3 ; serial
                3600 ; refresh
                3600 ; retry
                604800 ; expire
                86400 ; minimum
)
        NS 192.168.178.2
        IN MX 100 server.
$TTL 86400
$ORIGIN server.
@       IN A 192.168.178.2
*       IN A 192.168.178.2
@       IN AAAA xxxx:xxxx:xxxx:xxxx::2
*       IN AAAA xxxx:xxxx:xxxx:xxxx::2

and the named.conf entry

zone "server" IN {
        type master;
        file "pri/server.zone";
        notify no;
};
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.