hi all

I have installed apache server on my comp.
people on the LAN can access it by my IP address.

But I would like them to access it using an easier text name....not the complicated nos.

Is there any way to do this...and what are the precautions I need to take..

Thanks a lot
Praveen

Dani AI

Generated

Two practical, reliable ways to give the Apache box a friendly name on a LAN were already hinted at by and ; here are concrete, safe steps and common pitfalls to bridge those suggestions with what and saw in the thread.

A central DNS is best for multiple clients: assign the server a static IP (or a DHCP reservation) and add an A record (and optionally a CNAME) in the internal DNS zone for the chosen short name or FQDN. Keep TTLs low while testing and add a reverse (PTR) record if reverse lookups matter for services. Common mistakes: using a public TLD internally, forgetting DHCP search domains, or not opening TCP/80 in an internal firewall.

Per-client edits are fine for a handful of machines. A hosts-file entry is a one-line mapping:

192.168.1.10 myserver myserver.mylocaldomain.com

That file requires administrative rights to edit and clients must flush DNS caches after changes (Windows: ipconfig /flushdns; Linux: restart the local resolver or nscd/systemd-resolved as appropriate).

Apache needs the name it’s serving to match the Host header. A minimal VirtualHost example:

<VirtualHost *:80>
  ServerName myserver.mylocaldomain.com
  DocumentRoot /var/www/html
</VirtualHost>

Restart Apache after changing configuration.

Quick troubleshooting checklist (addresses issues raised in the thread): compare ping-by-name vs ping-by-IP; use curl -I or browser dev tools to see the Host header; check Apache access/error logs; confirm proxy settings (bypass local addresses can be required, as discovered); verify firewall/NAT rules; and, if the server’s public IP changes, consider a dynamic-DNS service (suggested by ) rather than exposing internal names to the Internet.

Recommended Answers

All 5 Replies

Use your DNS server...

Add an entry for like

yourname to point to that IP Address


or you cna just into the host file of every machine and add the host and ip in there as well..

this file is located at

c:\windows\system32\drivers\etc\

The ideal way is to use the dns server.

Just and a static entry for this server.

You should be able to hit it via

thanks a lot techniner...
the problem got solved by "allowing bypassing proxy for local addresses"

thanks a lot...

thanks a lot techniner...
the problem got solved by "allowing bypassing proxy for local addresses"

......am I correct, that's not Unlike IP Address Forwarding?

Use your DNS server...

Add an entry for like

yourname to point to that IP Address


or you cna just into the host file of every machine and add the host and ip in there as well..

this file is located at

c:\windows\system32\drivers\etc\

The ideal way is to use the dns server.

Just and a static entry for this server.

You should be able to hit it via

Can you explain this a little more?

Thanks.

use www.no-ip.com if u want ip forwarding with easy name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.