Click here to Skip to main content
15,884,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created local website that anyone can access as long as they are connected with the same network and I want them to use their phone to access it. I already knew how they can access the website on their phones by typing the link like this 192.168.1.1/project.php but I want to change it and make it more simple.

What I have tried:

I tried adding few codes in hosts and httpd-vhosts.conf like what I've watched on youtube I can access it with the computer I am using but my phone cannot reach the website even it is connected with the same network.
Posted
Updated 5-May-22 0:15am

1 solution

I take it you're after something like http://myapplication/ in order to access the project on your network. To that you're going to need to create custom DNS[^] record to resolve the host name to an IP address.

You can either add a custom DNS record on each machine (which is probably going to be inconvenient), or you can setup them up in your DHCP server. The DHCP server will likely provide the DNS and usually there'll be options in there for configuring it, more than likely on your router. If you login to your router as an admin, try and find anything about LAN IP setup or DNS, and in there might be options for adding hostnames to local IP addresses.
 
Share this answer
 
Comments
Rajeev Jayaram 5-May-22 6:47am    
Good information!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900