Apache2 name-based virtual hosting on Debian/Ubuntu | Open mind - 0 views
-
Name-based - you can host multiple website on a single server or a single IP Address but proper DNS configuration is required.
-
This will tell the system that example.com, example.net and example.org are not to be looked for on the internet, but on the local machine instead.
- ...13 more annotations...
-
We will enable Virtual Host in your /etc/apache2/apache2.conf file. Open /etc/apache2/apache2.conf file
-
Lets create a virtual host configuration for each site. You don't have to create from scatch actually, you can copy the default host configuration and customize it.
-
a2dissite default
-
The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
-
-
-
The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
-