jump to navigation

Creating virtual server in Apache on Debian April 28, 2006

Posted by maxmil in : Apache , trackback

1) Add new host to DNS:
a) Edit /etc/hosts and add host to line beginning 127.0.0.1 localhost.localdomain …
b) Run, hostname localhost.localdomain, to update hosts

2) Create new virtual host file in /etc/apache2/sites-available. Virtual Host ex.
3) Enable new virtual host:
a2ensite

4) Reload apache:
/etc/init.d/apache2 reload

Note: To remove host run a2dissite (and optionally delete configuration from /etc/apache2/sites-available

Comments»

no comments yet - be the first?