Tutorial

How To Launch Your Site on a New Ubuntu 12.04 Server with LAMP, SFTP, and DNS

Published on November 28, 2012
How To Launch Your Site on a New Ubuntu 12.04 Server with LAMP, SFTP, and DNS

Status: Deprecated

This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:

Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.

See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.

Summary

This article will take you from a fresh, new server to an online, working site. There are a variety of tutorials in our Community that separately will help you accomplish each step in the process. The following article will combine the relevant articles into a cohesive step by step to guide to set up your personal site on an Ubuntu server.

Step One—Create your Server

The first step to getting your site online is creating your VPS. You can find the information on how to launch your cloud server in our Getting Started Tutorial

Step Two—Basic Server Setup

After you have created your first server, you can start to secure it and create new users. Although this step is not required, nor are all the changes made in the tutorial necessary, it will begin to secure your server: Initial Server Setup.

Step Three—Install LAMP

Subsequently, we need to start setting up the server programs. A strong foundation for the server is the traditional LAMP stack: Linux (automatically installed on the server), Apache, MySQL, and PHP, a web server, database server and programming language, respectively.

Prior to setting up our personal site, we need to be sure that LAMP Stack is installed on the server.

Step Four—Set Up Your Domain

In order to ensure that your site will be up and visible, you should set up your DNS to point your domain towards your new server. The basic setup is almost all automatic, requiring you to only enter your domain and the IP address of the server that you are looking to host your site on.

You can find more information on Setting Up a Hostname by following the link.

Step Five—Connect with SFTP

Now your site should be up and connected, and, once the records have propagated, you should be able to see the standard Apache, "It Works!" page by visiting your domain in the browser. If you would like to visit your site before the records have been updated, you can access it by typing your server's IP address in the browser. Now it is time to bring out the big guns: ie. Customizing your setup so that you can upload your own pages to your site. In order to do this, you need to install and configure an SFTP client.

Filezilla is a great program to use.

You can download Filezilla from their site.

Once it’s downloaded and installed, start it running.

To begin transferring files, open up the Filezilla and within the file manager, open up the site manager options:

SFTP1
  1. Click on the new site button. You can double click the name of the entry to change the name
  2. Put your domain name (or IP address if your domain has not propagated yet) in the host field
  3. Fill in your username and password with the username “root” and the password you set earlier
  4. Click connect

Clicking connect will now allow you to transfer files from your computer to your server and build your site: be sure to drag them from your local directory on your left into your web directory (very likely /var/www) in frame on the right:

SFTP2
By Etel Sverdlov

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
10 Comments


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

May I simply say what a comfort to uncover somebody who really understands what they are talking about over the internet. You definitely realize how to bring an issue to light and make it important. A lot more people must check this out and understand this side of your story. I can’t believe you’re not more popular given that you surely have the gift.

Very Nice Explanation and referencing :)

Hey! I know this is kind of off topic but I was wondering which blog platform are you using for this website? I’m getting tired of Wordpress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.

Moisey Uretsky
DigitalOcean Employee
DigitalOcean Employee badge
January 30, 2013

In our case we wrote our community section (Articles and Blogs) ourselves.

Wordpress is great but can be a bit large and cumbersome so we just wanted to write something a bit more basic for our use.

I tend to prefer the SecureFX ftp program from http://www.vandyke.com

Hi, i’m able to log to the server with Filezilla and i see folder .cache, .ssh and files .bash_logout, .bashrc and .profile

My page domain show me IT WORKS!

I do all the steps in this page

It should not appear a www folder ? I try to add a index.html but the page It Works doesn’t change at all. Did i miss something?

I don’t see the info.php file but i access it???

g.nesia, yes something is wrong in that last step I have the exact same problem after following it perfectly and without and issues along the way. Anything I upload to /var/www is not seen… I think I need to change the home directory in apache?

Actually, even after updating the default root in “/etc/proftpd/proftpd.conf” its still bringing me to /home/USER/ instead of /var/www

Is it because proftpd isnt restarting properly?

sudo service proftpd restart

  • Stopping ftp server proftpd [ OK ]
  • Starting ftp server proftpd USER proftpd[5725]: mod_tls/2.4.3: compiled using OpenSSL version ‘OpenSSL 1.0 .1 14 Mar 2012’ headers, but linked to OpenSSL version 'OpenSSL 1.0.1c 10 May 2012 ’ library USER proftpd[5725]: mod_sftp/0.9.8: compiled using OpenSSL version ‘OpenSSL 1. 0.1 14 Mar 2012’ headers, but linked to OpenSSL version ‘OpenSSL 1.0.1c 10 May 201 2’ library USER proftpd[5725]: mod_tls_memcache/0.1: notice: unable to register 'memcache ’ SSL session cache: Memcache support not enabled
Mitch Wainer
DigitalOcean Employee
DigitalOcean Employee badge
February 14, 2013

In FileZilla select the advanced tab and enter /var/www into the default directory when you connect. Boom! You’re good to go! =]

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.