Uploading files to your server using FTP

Note that FTP, while commonly used, is not a secure way of transferring data as it is unencrypted. If you are uploading sensitive information, it is better to use SFTP, which is encrypted.

You must first have created a virtual host in your HTTP server before proceeding. This is done either when you configure your HTTP server during the creation of your Gandi server, or by adding additional virtual hosts later.

Also, in order to transfer files via FTP, you must also have installed an FTP server. If you have not done so, you may do so now by going to your Gandi AI server configuration page

Now that you know how to connect to your AI server via FTP, here is information that will tell you how to upload your website to your server.

Step 1: Logging into your server using FTP

Many people use a graphical FTP client (ex. Filezilla, CyberDuck…) to upload files to their websites using FTP. Because each client is different, the particular terms used will be different (username, user, login, etc…), but the basic information is the same.

  1. FTP server: the IP Address of your server
  2. username: admin (or the user you have attached to the virtualhost).
  3. password: the password you gave when you created your server (or the password defined for the user attached to the virtualhost).

Here is an example of logging in using CyberDuck (replace 123.123.123.123 with your own server's IP address):

guiftp.jpg

Be sure to use PASSIVE MODE.

For Gandi AI users, we suggest using the user attached to the virtualhost instead of ”admin”.

Step 2: Uploading your website

Once logged into your server using FTP, you will see a folder that corresponds to the disk name.

When you create a server using Gandi AI, a disk will be created automatically. It will have a name like d_servername (where ”servername” is the name of your server. If you have not specifically created a disk and attached it to your server, you will be using your default disk.

  1. open your disk directory. (For example, if I just created a server called ficus, then Gandi AI will create a disk called d_ficus)
  2. open the www/ directory
  3. You will see all the websites that you are hosting within the www/ directory. Open the directory of the website that you want to upload files to.
  4. open the htdocs/ directory. This is where your website goes.

In the following path: (disk_name)/www/www.somewebsite.eu/htdocs/ Please observe the following:

  • Do not place any file directly in the www/ directory, as they will not be visible on the web.
  • Place a website's private files (example: .htpasswd) in the directory that corresponds to your virtual host (in the example, this is in the directory www.somewebsite.eu/)
  • Place the files that you want visible on the web (or accessible, for example your .htaccess file) in the htdocs/ folder.

In the below example you can see that the server is hosting three websites, and that the user is going to upload his/her files into the folder that corresponds to the website www.somewebsite.eu.

guiftp2.jpg

Note that you will see Gandi's default index.html and image in that folder. They can be safely overwritten by your own website. As a reminder, your website needs to go IN the htdocs/ directory for it to be seen on the web, and associated with the right website.

Step 3: Testing

If you have put the website in the htdocs/ directory, and if your HTML code is correct, then you will see your website on the internet.

Remember that your web browser has a cache. Be sure to empty your browser's cache before testing to see if your content is online. If you do not do this, your browser will likely show you what was previously on your website. This is normal.

Last modified: 05/29/2013 at 09:53 by Ryan A. (Gandi)