How to setup 2 domains on the server

It’s for Debian/Ubuntu

First you need to add configuration files to /etc/apache2/sites-available/   (not, sites-enabled !!!)

Let’s suppose you have and, you need to create the files and and this code :

<virtualhost *:80>
Documentroot “/var/www/”
<Directory “/var/www/”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

Just the same for, then please type in console – “sudo a2ensite”, “sudo a2ensite”, after you’ve successfully added new web-sites, please reload apache  “service apache reload” and that’s all. Hope, I helped.


Leave a Reply

Your email address will not be published. Required fields are marked *