I use lighttpd as my web server.
I am currently accessing it using the IP address:
http://192.168.0.1
I want to access it as
http://myhostname.com
I would use it only on the local network, not on the Internet.
I do not know how to do that. I googled, but donβt know which keywords to use.
Place the following line in the /etc/hosts :
/etc/hosts
192.168.0.1 myhostname.com
For example, using the following command:
$ sudo echo -e '192.168.0.1\tmyhostname.com' >> /etc/hosts
you can add the rule to your hosts file: C: \ Windows \ System32 \ drivers \ etc \ hosts
add a rule like
On Windows, you cannot do this with wildcards, so for all subdomains you need to add a rule
Locate the hosts file on your local computer, and then add the following line:
192.168.0.1 www.somedomain.com
Source: https://habr.com/ru/post/1339629/More articles:What happens if I repeat the CSS style in IE? - cssI like Stripes, but I use sl4j / logback for logging, what are my options? - javaUsing git-svn to ignore file only in svn repository? - gitModules between multiple versions of Python Linux - pythonCalling Unmanaged C ++ Code from C # - c ++maven release: don't plan to deploy projects with release version - maven-release-pluginCreating dynamic user names and assgin roles - sqlSQL CREATE LOGON - cannot use @parameter as username - sqlFailed to check date in Spring MVC - dateBuild tool for iOS and Mac projects - iosAll Articles