Ubuntu Server afegir Vhost

De WikiMar
Dreceres ràpides: navegació, cerca

INFO AQUI: http://www.tequilafish.com/2007/08/02/apache-virtualhost-on-ubuntu/

cd /etc/apache2/sites-available
sudo vim yourdomain.com.conf and enter your VirtualHost directive.

Below I've put the most basic example, see Apache docs for details and additional features:

<VirtualHost *>
  ServerName yourdomain.com
  DocumentRoot /home/youruser/public_html
</VirtualHost>


Enable your new virtualhost:

sudo a2ensite yourdomain.com.conf

Reload the Apache configuration:

sudo /etc/init.d/apache2 reload