martes, 4 de septiembre de 2012

Multihost - Centos

Editar el archivo

gedit /etc/httpd/conf/httpd.conf

1) Descomentar

NameVirtualHost *:80

2) Crear virtual hosts


# Virtual host general.
<VirtualHost *:80>
 DocumentRoot "/var/www/html"
 <Directory "/var/www/html">
  allow from all
  Options +Indexes
 </Directory>
</VirtualHost>

#Desarrollo
<VirtualHost *:80>
 DocumentRoot "/var/www/html/tijedev/web"
 #DirectoryIndex app.php
 ServerName tije.dev.local
 <Directory "/var/www/html/tijedev/web">
  AllowOverride All
  Allow from All
 </Directory>
</VirtualHost>

#Testing
<VirtualHost *:80>
 DocumentRoot "/var/www/html/tijetest/web"
 #DirectoryIndex app.php
 ServerName tije.test.local
 <Directory "/var/www/html/tijetest/web">
  AllowOverride All
  Allow from All
 </Directory>
</VirtualHost>

Abrir el archivo /etc/hosts y agregar los NameVirtual:

127.0.0.1 tije.dev.local
127.0.0.1 tije.test.local

No hay comentarios:

Publicar un comentario