Gandi Wiki


Questions

Uploading your files using an sFTP client

Using FileZilla

The screenshots in this guide are from Filezilla version 3.5.1 for Macintosh. You can download the client here. FileZilla is well-known for being free, though also because it is easy to use, powerful, and versatile.

This client, initially a pure FTP client, is also able to use sFTP, which is what we use for Gandi Simple Hosting, which will refuse the FTP protocol.

a simple and clean interface

Connecting to a Gandi Simple Hosting interface

To connect to your Gandi Simple Hosting instance, you just need to know your host, username, and password.

Following the creation of your instance, you were sent an email (the subject is "[GANDI] Your Simple Hosting instance has been created.") containing this information. The lines look like the following:

Your sFTP connection settings are:
sFTP: sftp.dc0.gpaas.net
User: 123456
Password: what you entered when you created the instance.

Note:

  • sftp.dc0.gpaas.net for the datacenter in Paris
  • sftp.dc1.gpaas.net for the datacenter in Baltimore

Click on "File" on the top menu bar, and choose "Site Manager". This will bring up the little window where you can add this information. Be sure to first click on the "New site" button, and then choose SFTP as the protocol and the Logon type to be Normal" (note: obviously you will replace 123456 in the example by your real user number that you got in your email):

Enter the information and click Connect

When you click "Connect" to proceed to the next step you might see the following alert:

Click on 'Always trust this host, add this key to the cache", and click OK to continue. You will then be connected to your server, and will see a window that displays the contents of your instance (the contents may vary depending on the type of instance and its version):

The pathinfo.txt file gives you some information on the contents and purpose of the directories (folders) in your instance.

Double click on the "vhosts" folder icon to go to where your virtualhosts are located. Once here, you will see a bunch of folders that correspond to the name of a website (virtualhost) that you specified to be hosted by your Simple Hosting instance.

In the above examples, my virtualhost is called test.sundaysailor.com because I want to have a website at an address like http://test.sundaysailor.com.

If you have more than one virtualhost (website) folder, then click on the one that you want to upload files to.

You will then have the location where you will upload your website!

Note:

You will manage the folder creation, file moving, renaming, rights etc. via your FTP client. we have been using FileZilla in this example, and so right-clicking on a folder or file will bring up a little menu that presents you with these options.

You will need to see with your FTP client instructions for assistance with those types of operations, however they are usually straight forward.

Using WinSCP

WinSCP is free open source software for transferring files and folders by sFTP. It is developed exclusively for Windows. WinSCP is simple to use and has multiple program interfaces. It also has advanced features including the creation of symbolic links (symlink).

You can get WinSCP for free on its official page.

Once the software has been installed, you must create your first connection.

Please note that the File protocol selected must be SFTP.

The Host name and the User name of your Simple Hosting instance can be found in your instance summary, as shown at the top of this page. Use the password you chose when creating your instance.

Once this information has been entered, it is advisable to save the session configuration (except the password) in WinSCP to be able to connect faster in the future.

Once connected, you will see the instance tree and will be able to transfer your files to your virtual hosts.

Remember that your files must be placed in the /htdocs/ directory of your virtual hosts to be seen!
To transfer your files, simply drag them to the target directory on the left side of the window.

Creating a symbolic link

One of the interesting applications of WinSCP is the ability to create symbolic links. A symbolic link allows one folder to be pointed to another.

This option is useful in the case of developing a new version of a site in parallel, sharing a file between two virtual hosts, or during a hoster transfer, for example.

Let's look at an example of how to create this type of link:
I created two virtual hosts in my instance: www.shs.im and dev.shs.im.

I've just finished development and now I want the directory /htdocs/ in www.shs.im to point to /htdocs/ in dev.shs.im.

I go to the vhost folder that is to be redirected, namely /www.shs.im/. We'll be deleting or renaming this directory, so make a backup!

Once the directory has been renamed (or deleted), navigate to the parent directory, in this case in the /www.shs.im/, then create a link (click the Add/Edit link icon, or Ctrl + Alt + L, or Right-click in the window on the right and choose New > Link).
This link must be correctly formed to work: the destination must be relative.

In our example, the name of our link (shortcut file) will of course be "htdocs" but the target must be reached with a relative path. So, in our case: "../dev.shs.im/htdocs/".

Important:

Remember, the two periods + slash (.. /) represents navigating up one level, to the parent directory, in the current tree. Do not use the absolute path (/ lamp0/web/vhosts/dev.shs.im/htdocs) because it won't work!

Questions

RSS feed for questions matching this filter (Help)

Last modified: 05 Mar 2012 at 11:59 by Cedric L. (Gandi)