› Foros › PC › Software libre
sodark escribió:Virtualhost te sirve perfectamente. En mi casa tengo alojadas las siguientes webs y tengo IP dinamica.
driverlandia.com
estherpg.es
bcnserver.dyndns.org (esta , está directamente en /var/www )
Yo ahora me estoy peleando con BIND para redireccionar el correo del servidor ( registros MX ) a google y tambien para poder hacer subdominios.
<VirtualHost *:80>
ServerName midominio.es
ServerAlias www.midominio.es
DocumentRoot /var/www/midominio.es/
ServerSignature On
ErrorLog /var/log/apache2/midominio.es-error.log
LogLevel warn
CustomLog /var/log/apache2/midominio.es-access.log combined
<Directory "/var/www/midominio.es/">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
a2ensite midominio.es
root@BCNSERVER:/etc/apache2/sites-available# cat driverlandia.com
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName driverlandia.com
ServerAlias www.driverlandia.com
ServerAlias driverlandia.es
ServerAlias www.driverlandia.es
DocumentRoot /ruta/de/vhost/driverlandia.com/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /ruta/de/vhost/driverlandia.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
root@BCNSERVER:/etc/apache2/sites-available# cat estherpg.es
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName estherpg.es
ServerAlias www.estherpg.es
DocumentRoot /ruta/de/vhost/estherpg.es/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /ruta/de/vhost/estherpg.es/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>