Apache Virtual Hosting
Virtual HostingChange directories to the sites-enabled directory. $cd /etc/apache2/sites-enabled/ Create your configuration file $sudo vi example.com.conf Add the following;
<VirtualHost dev.example.com>
ServerAdmin webmaster@localhost
ServerAlias www.dev.example.com
DocumentRoot /home/user/public_html/example.com
ScriptAlias /awstats/ /usr/lib/cgi-bin/
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
Create a link in sites-available $sudo ln -s /etc/apache2/sites-available/example.com.conf example.com.conf Edit /etc/hosts so that you can use a named server for development. $sudo vi /etc/hosts Find the line that starts with 127.0.0.1 when you finished it should look something like this. 127.0.0.1 localhost dev.example.com Reload Apache. sudo /etc/init.d/apache2 reload Created by: admin last modification: Saturday 29 of March, 2008 [06:06:29 UTC] by admin |
Login
|