M
M
Mikhail5552015-04-06 11:31:46
Apache HTTP Server
Mikhail555, 2015-04-06 11:31:46

Why don't four virtual hosts work on Apache?

In general, there is a server with Debian, Apache, mysql, etc. are raised on it.
The server lives in the internal network, and a kerio proxy is configured from outside. On DNS A records for four addresses are registered. When accessing addresses, forwarding occurs to the server at the internal address.
And here's the trouble itself, when you set up virtual hosts on Apache, namely:
1) write an entry in /etc/hosts - 127.0.1.1 my.site.ru
2) create a configuration file /etc/apache2/sites-available/my. site.ru with this content

<VirtualHost *:80>
  ServerAlias my.site.ru www.my.site.ru
  DocumentRoot /var/www/sites/my.site.ru/
  <Directory /var/www/sites/my.site.ru/>
    AllowOverride All
  </Directory>
</VirtualHost>

3) Turn on the site with the command - a2ensite my.site.ru
4) Restart Apache with the service apache2 restart command
In this case, everything works as it should, but when I do this with four addresses, it turns out fuss, namely when accessing one address , redirects to another folder, etc. Every time everything breaks randomly, and only one address works correctly.
What's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FernandoErrNando, 2015-04-06
@FernandoErrNando

directives

NameVirtualHost *:80
Listen 80

prescribed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question