Answer the question
In order to leave comments, you need to log in
Apache virtual hosts do not work. Where did I go wrong?
Why, when I go to parser.localhost and another directory is shown on test.localhost, namely the root directory of the entire web server (D:\MAMP\htdocs). At the same time, qu.ru shows everything correctly.
I'm not well versed in Apache, but I seem to have done everything according to the documentation. What could be the problem?
Thank you!
Listen 80
<VirtualHost parser.localhost:80>
ServerAdmin [email protected]
ServerName parser.localhost
ServerAlias www.parser.localhost
DocumentRoot D:/MAMP/htdocs/parser
</VirtualHost>
<VirtualHost test.localhost:80>
ServerAdmin [email protected]
ServerName test.localhost
DocumentRoot D:/MAMP/htdocs
</VirtualHost>
<VirtualHost qu.ru:80>
ServerAdmin [email protected]
ServerName qu.ru
ServerAlias www.qu.ru
DocumentRoot D:/MAMP/htdocs/1_table/basic/web
</VirtualHost>
DocumentRoot "D:/MAMP/htdocs"
Answer the question
In order to leave comments, you need to log in
parser.localhost and test.localhost resolve correctly?
UPD: I usually do something a little wrong. I don't know how correct this is, but it works for me :)
NameVirtualHost X.X.X.X
<VirtualHost X.X.X.X:80>
ServerName my.super.server
...другие директивы...
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question