Lo que me gustaría es poder montar los servidores virtuales independientes con un nombre de dominio
Entiendo que deberia tener dicha configuración en apache:
/etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.4 centos7
##como servidores virtuales...
192.168.1.4     serv01.loc
192.168.1.4     serv02.loc
192.168.1.4     serv03.loc
/etc/httpd/httpd.conf
ServerRoot "/etc/httpd"
Listen 192.168.1.4:80
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin [email protected]
ServerName centos7:80
<Directory >
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
    AllowOverride None
    Require all granted
</Directory>
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
<Files ".ht*">
    Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>
<IfModule mime_module>
    TypesConfig /etc/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
    MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
<VirtualHost serv01.loc:80>
    ServerName serv01loc
    DocumentRoot "/var/www/serv01/"
    <Directory "/var/www/ser01">
        allow from all
        Options None
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost centos7:80>
    ServerName centos7
    DocumentRoot "/var/www/"
    <Directory "/var/www/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
<VirtualHost serv02.loc:80>
    ServerName serv02
    DocumentRoot "/var/www/serv02"
    <Directory "/var/www/serv02">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
<VirtualHost serv03.loc:80>
    ServerName serv03
    DocumentRoot "/var/www/serv03"
    <Directory "/var/www/serv03">
        Options Indexes FollowSymLi
...
en windows el servidor dns esta de esta forma...
serv01.loc da ping 192.168.1.4
serv02.loc da ping 192.168.1.4
serv03.loc da ping 192.168.1.4
nslookup también...
Mi problema no se si se la configuración de apache, que me lleva siempre al primer serv01.loc cuando escribo serv02.loc, o serv03.loc al escribir la ruta en el explorador, tratenme bien soy nuevo en centos, gracias. poe leer
¿Alguna sugerencia?, muchas gracias de antemano....



