I've just configured a PC with a dhcp server and an apache server on it. I want to set a hostname to my server (i.g "myserver") in order to be able to access its web server by writing on the browser "myserver:80". Here's the dhcpd.conf file:

#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;
log-facility local7;

subnet netmask {

  host myserver{
    hardware ethernet xx:xx:xx:xx:xx:xx;



edit your /etc/hosts file of your PC and add the following:    myserver

If you'd like to be able to access myserver across the entire network, you'd need to configure an internal DNS server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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