A
A
apaicer2019-02-19 13:19:06
linux
apaicer, 2019-02-19 13:19:06

Why does apache conflict with different domains in httpd.conf?

Good afternoon. Question of the following nature. On VB raised centos 6 and PHP with Apache.
When changed /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/user/lazy.org/
ServerName www.lazy.org
ServerAlias lazy.org
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/user/baby.com/
ServerName www.baby.com
ServerAlias baby.com
</VirtualHost>

Also added to /etc/hosts
myip www.lazy.org
myip www.baby.com

Lazy works but baby doesn't? What is the problem? All directories are created. On baby.com now "A connection attempt failed.", it turns out that he blocked the real resource baby.com, but for some reason does not want to open the virtual one.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2019-02-19
@Sanes

myIP lazy.org www.lazy.org baby.com www.baby.com
Sometimes you need to separate not with a space, but with TAB

P
Prog, 2019-02-19
@damprog

It is also useful to use search
How to make apache on several domains?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question