Difference between revisions of "Name VirtualHost"

From Supercomputación y Cálculo Científico UIS
Line 16: Line 16:
  
 
{{File|/etc/apache2/...|<pre><nowiki>
 
{{File|/etc/apache2/...|<pre><nowiki>
<VirtualHost *:80>
+
<VirtualHost *:80> 1
 
         ServerName soportesc3.uis.edu.co
 
         ServerName soportesc3.uis.edu.co
 
         ServerAlias *.soportesc3.uis.edu.co
 
         ServerAlias *.soportesc3.uis.edu.co

Revision as of 01:37, 27 September 2016


Logo_sc33.png

Name VirtualHost

The following example shows how to setup a name virtualhost in apache for dispatching several sites from the same server. The setup shown below serves a website for the address soportesc3.uis.edu.co and its subdomains from the local directory /var/www/support

File: /etc/apache2/...
<VirtualHost *:80> 1
        ServerName soportesc3.uis.edu.co
        ServerAlias *.soportesc3.uis.edu.co
        DocumentRoot /var/www/support
        DirectoryIndex index.html index.php index.htm
</VirtualHost>