Question

how can i simply start a HTML page and start my own page and i want to know how to edit it later

Posted November 16, 2016 8.9k views
UbuntuApache

please, i want simple answers i’m new at this things and i need to knew HTML in a simple way
and..... yeah.... i like your website .
thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

To launch a server serving an HTML page you can use the following steps.

1.) On the create droplet page create a droplet (server) using the LAMP image (under the one-click apps tab). Any size will do for hosting static content.

2.) You will receive an email with a temporary password. Before you can start managing your files you will need to set a permanent password. You can do so by doing the following:

  • On your droplets page click the More section on the far right for your new droplet and click “Access Console”

  • Enter the username “root”

  • Enter the temporary password that was emailed to you. Unfortunately copy/paste will not work here.

  • Enter the temporary password a second time

  • Enter your new password and retype it to confirm

  • Close the console window

3.) Now that you have a permanent password you will be able to log in via SFTP to manage your files. Any SFTP client will work but for this example we will use the free Filezilla client. If you do not already have Filezilla, download and install it.

4.) Click the left-most button on the Filezilla toolbar. This will open the “site manager”.

5.) Click on “New Site” and enter the following information:

  • Host: Your droplet’s IP address
  • Port: 22
  • Protocol: SFTP - SSH File Transfer Protocol
  • Login Type: Normal
  • User: root
  • Password: The new permanent password you created

Then click “Connect”

6.) Your server’s files will appear in the right hand side and your local files in the left. You will start out in the directory /root and your web files will be in /var/www/html so you will first need to go up a directory by double-clicking on .. in the right side pane, then navigate to /var/www/html

7.) A file named index.html placed in this directory will be served by your droplet if you enter your IP address into your browser.

That is the bare essentials. I would also recommend reviewing these tutorials

If you run into any trouble following these steps follow up here and I’ll be happy to clarify or help troubleshoot.

Another option if you would prefer to have a blog platform like WordPress would be to use the WordPress one-click image. This will allow you to get a site up and running easily but would not directly support just uploading html files.

by Mitchell Anicas
When you start a new server, there are a few steps that you should take every time to add some basic security and give you a solid foundation. In this guide, we'll walk you through the basic steps necessary to hit the ground running with Ubuntu 16.04.

You can edit HTML documents directly on the terminal window using the nano editor or the vim editor. Nano editor is easier for newcomers but i think learning how to use vim is better in the long run. Vim is usually a total puzzle for beginners but if you learn a few commands you will get it fast.

Now let says you are using the terminal and you are connected to your server and that you are on the folder where you have your index.html file (index.html which is the default front page of your website).
Then you would have to type on your terminal the comand: “nano index.html” (without the “”) and it would open the index.html for you to edit on the nano editor. After you make your changes you have to save and close. (you have to learn how to do that on the nano editor as well but is easier to grasp than the vim editor)

Also, you could also edit any html document using Atom (a free text editor you can download from the internet) but then you would have to know how to upload your index.html (or whatever page you are editing) to your server.

You can upload any file to your server using Filezilla like @ryanpq explained before, or you can download an “FTP” plugin to use within Atom. (so you will have a program that does two things A) edit documents B) upload those documents to servers) How to find and install plugins on atom is something you can learn on the web. For example on youtube.

There are many other text editors (programs you use to edit web pages including those in the html format) but to my knowledge the best are: Atom, (free) and Webstorm (not free but you can try it for 30 days). I prefer webstorm cause it has everything i need included (such as the FTP and SFTP functionality to upload files), and even a nice terminal window there.

Thanks for the detailed steps @ryanpq.

I have followed them and my domain is pointing to my Digital Ocean droplet (Ubuntu 18.04.3 (LTS) x64) but unfortunately I cannot reach the page.

I had to create this route /var/www/html manually though, it was not in the droplet when I accessed it. I was wondering if I am missing any step before the very first one you mentioned.

Thank you very much.

  • Hi @consolelog,

    I’ve just answered your question here. I think think that in your case Apache was not installed, you need to first install Apache, then the /var/www/html directory would be created automatically.

    Regards,
    Bobby

Thanks so much for your answer @bobbyiliev .

I finally figured it out and solved it.

For future reference:

First, and after creating the droplet, I configured the server:

Initial Server Setup with Ubuntu 18.04
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04

Then, I installed Nginx instead of apace, following this guide:

How To Install Nginx on Ubuntu 18.04
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04

Only after that, I followed the steps detailed in this post:

how can i simply start a HTML page and start my own page and i want to know how to edit it later
Url: https://www.digitalocean.com/community/questions/how-can-i-simply-start-a-html-page-and-start-my-own-page-and-i-want-to-know-how-to-edit-it-later

by Justin Ellingwood
by Kathleen Juell
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or reverse proxy. In this guide, we'll discuss how to get Nginx installed on your Ubuntu 18.04 server.
Submit an Answer