I am running Lighttpd 1.4.28
on an embedded device. Apart from the webserver, I run udhcpd
and dnsmasq
to allow other devices to connect to my embedded device to access the website.
My device has the capability to join other networks. So when I make my embedded device join my local home wireless network, I am able to access the website with the IP obtained by this device after joining the local home network, but not by the hostname.
When I join the local home network, I kill the udhcpd
server as my local home network has a DHCP Server and DNS Server running which automatically assigns the IP.
I pass the hostname of my device when requesting IP through udhcpc
as:
udhcpc -h "www.mydevice.com"
My problem is I am only able to access the website running on the device as :
http://192.168.100.101/index.html
and not as:
http://www.mydevice.com/index.html
Can anybody tell me where am I going wrong? Am I missing something?
Thanks.