Configurar un servidor virutal amb l'Apache
http://httpd.apache.org/docs/2.0/vhosts/examples.html
20-01-2009
he afegit un nou domini a dyndns.org: joanillo.dyndns.org
afegeixo la línia joanillo.dyndns.org al fitxer /etc/ddclient.conf, reinicio el servei, i ara ja em puc connectar a:
http://joanillo.dyndns.org, que em redirigeix a:
http://joanillo.dyndns.org/wiki/index.php/P%C3%A0gina_principal
igual que ho fa el http://wikijoan.dyndns.org
Tinc dos dominis dyndns que apunten al mateix lloc.
Ara he d'aconseguir que apuntin a llocs diferents dins del mateix Apache. Això es fa configurant un servidor virtual.
dins de /etc/apache2/sites-enabled:
sudo cp 060-terra 060-joanillo
i modifico 060-joanillo per tal que apunti al blog:
ServerName http://joanillo.dyndns.org DocumentRoot /home/joan/blog
/etc/init.d/apache2 restart
i funciona perfectament. Ara tinc dos dominis de dyndns.org que apunten al meu servidor Apache, però a sites diferents dins l'Apache:
- http://wikijoan.dyndns.org que apunta a /home/joan/wiki
- http://joanillo.dyndns.org que apunta a /home/joan/blog
No he hagut de tocar res del router.
creat per Joan Quintana Compte, setembre 2008