Gandi AI: Set up virtual hosts for HTTP/FTP

Essential configuration

This step is essential for your server to be organized according to the domains (virtual hosts) that will refer to it.

You will need to create and select a user for each virtualhost. This user (and of course the user admin) will have access to the files of this virtualhost. This will allow you to share the management of the website corresponding to the vhost with another user.

Following which, you'll need to configure these virtual hosts by pointing them to the server (see below).


In the above example, you can see how a server can be configured according to the relevant virtual hosts.

The www and blog sub-domains for example.net and the www sub-domain for anothersite.com will have their own folders on my server.

Once these virtual hosts point to your server, the following addresses will direct visitors to content hosted on your server:

http://www.example.net
http://blog.example.net
http://www.anothersite.com


Advanced configuration

Now let's take a look at one of the options available in this module's Advanced server administrator mode (make sure you have activated this mode at the top of the AI interface).

  • Add aliases: In the “Server Alias” section, you can enter all the sub-domains corresponding to this virtualhost. Aliases represent other domain names that will respond by displaying the same site.



  • Add a protected directory: use this option to restrict the access of a folder of your virtualhost. For example, type /protected if you want to restrict the access to www.example.net/protected.



Restricted access to your server for a user, as set up here, only concerns the use of FTP clients. If a user of yours connects to your AI server using SSH, he or she will have a much wider range of action. This function should therefore only used to give access to people you trust. Server-less friends, in other words. :)

You won't be able to “see” your websites at your chosen domains unless you have pointed these domains to your server by configuring your virtual hosts.

See also

Last modified: 06/04/2013 at 11:04 by Ryan A. (Gandi)