How-to create a virtual host in Apache (Ubuntu)
Tags: apache domain linux virtual host
You will find on most Linux based web hosts a directory which is called “sites-available” (inside /etc/httpd/ or /etc/apache2/). Create a configuration file with the name “domain.com” for your host and add this code:
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin webmaster@localhost
DocumentRoot /home/user/domain.com/public_html/
ErrorLog /var/log/apache2/domain.com-error.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg
LogLevel warn
CustomLog /var/log/apache2/domain.com-access.log combined
Create the directory for your web host and activate the host with a2ensite domain.com and reload your apache engine.
Related Posts
-
How-to install AWStats on your Ubuntu Web ServerGreat how-to article which works “out of the box”. I used the instructions for my [...]
-
Ubuntu run PHP 5.2 and 5.3 togetherGreat tutorial! It works for 95% on my Ubuntu 11.04 machine, will say I needed [...]





