I have just had a second IP for my web server and wish to use it for a dedicated domain name.
Here is how you configure apache2 to serve requests on that IP to a specific virtualhost
assumptions:
new IP is 192.168.1.2
new website is called newip.labby.co.uk
<VirtualHost 192.168.1.2>
UseCanonicalName Off
ServerName newip.labby.co.uk
ServerAlias *.newip.labby.co.uk
ServerAlias *
DocumentRoot /var/www/newip.labby.co.uk
ErrorLog /var/log/apache2/error-newip.labby.co.uk.log
LogLevel warn
CustomLog /var/log/apache2/access-newip.labby.co.uk.log
<Directory /var/www/newip.labby.co.uk>
Allow From All
Options +Indexes +FollowSymLinks
</Directory>
</virtualhost>
The following is unaffiliated with labby.co.uk




















































