Create your first website on Cloud Servers quickly

  • Last updated on: 2018-10-25
  • Authored by: David Hendler

The Rackspace Cloud can save you both time and money. This guide shows you how to do both by explaining the basic process of turning your idea into a working site in three basic steps:

  1. Build the infrastructure
  2. Upload your code
  3. Test

The project that you’re bringing to the cloud is probably much more complicated than what this guide covers. However, the process that this guide uses applies to the successful deployment of any web site or application.

This guide is not a comprehensive tour of Cloud Servers. However, by following these instructions, you are establishing the fundamentals that you can build on by reading future articles and guides.


The information in this guide is practical, so if you plan to follow along step by step, you might need to download and install the following software:

  • an SSH client application
  • an SFTP client application

If you don’t have a website to upload, you can use an HTML file created for this exercise. Download it here (right-click to save the file).

Build the infrastructure

In this section, you create your server, connect to it, and install the Apache web server package to turn the server into a web server.

Create a cloud server

  1. Log in to the Cloud Control Panel, using the user name and password that you entered when you created your account.

    The control panel supports many Rackspace products and services. Each component of this interface, and all of our products and services, are explained in other articles and videos (for example, Introducing the Cloud Control Panel). This guide focuses on deploying your first cloud server.

  2. In the top navigation bar, click Select a Product > Rackspace Cloud.

  3. Select Servers > Cloud Servers and click Create Server.

    In most cases, you can deploy the right infrastructure with just a few clicks.

    You have a large amount of control when creating a new cloud server, but, to keep things simple, this guide focuses on the three required parts: name, image, and size.

  4. Name your Cloud Server.

    The name of your cloud server should communicate its role (for example, web server or database) and what it’s hosting.

  5. Select an image.

    The image that you select contains both the OS and preselected software.

  6. Select a flavor.

    Flavor refers to the server’s capacity for CPU, RAM, and hard drive. You can think of flavor as the “size” of the server. When you need more power, you want to select a “bigger” Cloud Server, so you select a higher capacity flavor. Because this is a test server, save some money and select the 1 GB General Purpose flavor.

  7. Click Create Server.

    A pop-up window is displayed with your server’s Root Admin Password. You need this password to connect to the server later in this guide, so copy it before you click Dismiss Password.

  8. Verify that the build is complete.

    The time it takes for your cloud server to build depends on the image and flavor that you selected. The server is finished building and is ready for a connection when the Server Status is Active.

  9. Copy the public IP address.

    Now that you have an active cloud server, you need to make it a web server. You do this by connecting to it and installing the Apache web server package. You use the server’s IPv4 address (PublicNet), which you can find in the Networks section of the server’s detail view. Copy the address for later use.

Connect to your server

You can connect to a server in several ways, but the standard and most secure method is called Secure Shell, or SSH. It allows you to send information to and from your server in a secure fashion.

  1. Connect from either a Mac OS X or Windows Computer.
    • Connect from Mac OS X

      You can connect to your cloud server from a Mac OS X computer by running the ssh command in or the SSH client you downloaded that at the beginning of the guide. You can find the command to use SSH in the right-side bar of the server detail page of the Cloud Control Panel.

      Copy this command and paste it into your terminal, or click it and opens for you.

    • Connect from Windows

      You can use an SSH client to connect to your server from a Windows computer. For instructions that use the PuTTY SSH client, see Connecting to Linux from Windows by using PuTTY.

      The first time that you connect to a cloud server, your computer verifies that this is something you want to do.

  2. Type yes and then press Enter.

  3. Type or paste the password that you copied in step 6 when you created the server.

    If the password is correct, you connect to your server. You will see a screen similar to the following one:

Install Apache

To install Apache, enter the following command in the terminal window:

apt-get install apache2 -y

Some information scrolls by in your terminal window. This is your server downloading and installing Apache and any software Apache might need to operate correctly.

Test Apache with your web browser

After the command is finished running, ensure that Apache is installed and turned on. Put the (PublicNet) IPv4 address of your cloud server into a web browser. If you see the message “It works!”, you now have a web server installed on your cloud server.

This “It works!” site file is stored as index.html in your DocumentRoot directory.

Upload your code

The next step is to upload your site. You might be familiar with File Transfer Protocol (FTP) as a way to upload files to and download files from another computer. Rackspace Cloud Servers uses SSH File Transfer Protocol (SFTP) for added security, so you need an FTP client that will support an SFTP connection. Fortunately, many of the popular and free FTP clients do this.

Common steps to establish an SFTP connection with your server

  1. When you create a new connection, be sure to choose the SFTP (SSH File Transfer Protocol) option.
  2. For the server, type the IP address of the cloud server.
  3. For the username, enter root.
  4. For the password, enter the root user’s password.
  5. Click the option to establish the new connection to your server.

Upload your site

If you haven’t already downloaded the sample HTML file, download it from here.

You should not upload the HTML file just anywhere on the Cloud Server. Apache is configured to look in a specific directory for content to serve on the web. This special directory is referred to as the DocumentRoot.

On an Ubuntu server, the DocumentRoot is located at /var/www, so upload your site file to that directory. Navigate to that directory in your SFTP client, then replace the existing index.html file with your file.

Test your site

Now that the correct HTML file is uploaded to the correct directory, you should see your site when you refresh your browser.

Congratulations! In a short period of time, you deployed a cloud server, connected to it via SSH, installed the Apache web server, uploaded a new HTML file to the server’s DocumentRoot directory, and tested the site in a web browser.

Next steps

Several resources are available to help you progress:

Continue the conversation in the Rackspace Community.