mayTermux / lampTermux

LAMP on Android
GNU General Public License v3.0
120 stars 41 forks source link

Creating local domains. #18

Open matveyb9 opened 3 weeks ago

matveyb9 commented 3 weeks ago

Hello, dear developers. Please tell me how to create a local domain, for example site.local.

armandwipangestu commented 3 weeks ago

You need to have a DNS and then create a Virtual Host on the web server. For example, I'm using Laragon in my Windows operating system. They work with creating a domain name at /etc/hosts (this is a local domain on your system)

image

and then creating a Virtual Host that mapping the local domain to the correct php location (in this I'm using a Nginx web server)

image

NOTE: Here an example if creating a Virtual Host using Apache as Web Server image

But now the problem is how android / termux can edit the /etc/hosts. I don't know what if you make a DNS Server and then create an A record that pointing to the IP Address of your phone, then create a Virtual Host at the web server for the mapping to the correct php location

matveyb9 commented 3 weeks ago

Please tell me how to create a virtual domain in Termux