Answer the question
In order to leave comments, you need to log in
Why is there no transition to the domain name of the virtual host, but only by IP?
Raised a web server, successfully navigated by host IP:
1. Created the testdomain directory
2. Created a virtual host
file Activated the file using the a2ensite command, disabled the default site, no errors
Restarted the server, but when switching to http://testdomain/
, a google request goes to www6 .testdomain.com
What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
A host is one thing, but a host's domain name is another.
You either need to set up a DNS server, in which you specify that testdomain is located at 192.168.1.193, or (which is much easier) specify
192.168.1.193 testdomain in /etc/hosts It will work, of
course, it will only be on the machine where it is registered.
The config specifies testdomain , and in the browser you are trying to open www6.testdomain.com .
testdomain won't resolve naturally, so put it in /etc/hosts and navigate to testdomain in your browser
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question