Skip to main content

JOIN ME!

MY first day on the blog!  It has been a busy two days learning how to put a webpage on the internet, by using a piece of my own server real estate.  ๐Ÿ˜Š
So far I have:

1.   I learned that I first needed to sign up for a virtual private server.  It was recommended to me that I go with Amazon Web Services (AWS) because they have free services available and they are the industry standard.  I needed to do this because I need to have a web server.  Since my home computer is not a web server, I needed to have access to a computer that is a web server, hence AWS.  They are the ones that will host a server for me.  It is my own private EC2 Instance server (which is a VERY SMALL tiny piece of a MASSIVE computer server that is located somewhere in this country). 

2.  When I signed up for the private server (EC2 Instance), a key pair was generated by AWS.  What is that?  Basically it’s a pair of keys that allows me access.  One key is a public key that is kept on my EC2 Instance.  The other key is a private key that I downloaded and filed on my computer.  If both “virtual” keys match when put together, I am allowed access to my EC2 Instance to make changes.  AWS not only put the public key on my EC2 Instance, but it also opened the “port” to allow SSH (Secure Shell) through.  This port is like a specific area in the outer shell of my server which only lets in SSH traffic.  But unless it is opened, the SSH request to log-on to my EC2 Instance would be blocked.  
                                  
Well... that's it for today!  Watch out for my next post where I will talk about XML.   

Follow me as I learn to build my website bit by bit!    IronTreeDev.com
                                   


Comments

  1. Wow. Great start. So it seems there were 5 basic steps:
    1 SIGN UP FOR FREE VIRTUAL PRIVATE SERVER AND CONNECT TO IT VIA SSH FROM YOUR LOCAL COMPUTER You have created an AWS virtual server, and when that was done, a port for ssh was already open for you to "ssh into it" with the key they let you download for it.
    2 USE DOMAIN NAME INSTEAD OF IP You already had a domain name, so you pointed it to the (external) IP address of your new server, so you don't have to keep using that IP address, either in your ssh command or in the browser.
    3 INSTALL WEB-SERVER SOFTWARE ON YOUR EC2 You tried pointing your browser to your ec2 instance via this domain name and that didn't give you a page, so you installed a web-server (httpd) on your ec2 instance. Without web-server software running on your server, no web page can be returned.
    4 ALLOW HTTP TRAFFIC TO YOUR EC2 You tried pointing your browser to your ec2 instance again expecting to see a test page, but didn't. You know your ec2 instance was running because it allowed ssh requests in. You know that the httpd software was started. Impossible problem to solve? You went back to your AWS account and examined the configuration of your ec2 instance and saw that, although you had a rule to allow the ssh "sperm" to enter your "egg", you did not have a rule to allow http ("web sperm") to enter. Adding that rule was easy, and (since you had running httpd software) you immediately the wonderful test page that showed that the connection from your browser all the way to the ec2 instance's httpd software was working.
    5 CREATE A SIMPLE WEB PAGE Although happy to see a web test page, you wanted to see a page that YOU wrote, so you ssh'ed back into your ec2 instance, you cd'd to the "web doc root" directory that the test page mentioned (i.e. /var/www/http/) did a listing, and saw nothing there, since this is an empty webserver at this point. You used vi (with the mysterious "sudo" command) , since all computers have this text editor, to create your first webpage, which you called webpage.html, you *i*nserted text with the vi editor, and then you *w*rote the file and *q*uit.

    Now when you point your browser to your domain, your browser translates the domain name to the ip address of your aws server (a quick query to the DNS server) and the little "http sperm" makes the following stops all the way to its destination: out your gateway (spectrum?) to the internet to your ec2-instance, a virtual private server (inside the big directly-connected-to-the internet aws supercomputer), through the open http port, to the httpd software, routed to the web doc-root directory on the ec2 instance, to the file that mimics the same path that you had after the first forward slash of your browser's address. The content of this file then makes its return trip back out the way it came in back to your browser.

    Technology used:
    "DEVOPS" TECH:
    on your macbook: "termainal/command window"; unix commands ssh, pwd, ls, cd, vi (esc,:, q,w,i), yum (to update and install software, like the httpd), exit
    on aws account: create ec2 instance, start instance, download key, find external IP address, configure HTTP and SSH port
    on registrar: change the DNS "A" record to point fro the old ip adress to your new ip address
    HTTP:
    to write the first webpage.html



    ReplyDelete
  2. Sounds like Greek to me.. lol. Glad you understand it Prima. Proud of you.

    ReplyDelete

Post a Comment

Popular posts from this blog

XPATH and XPATH Expressions In XMLLINT

XPATH And XPATH Expressions Earlier, I told you about xmllint and xmllint for html files .  Let's say you just want to parse the <span> tags within your html file or just your <span lang="el"> tags? Enter:  Xpath. Xpath is yet another option available within the xmllint language. Remember, an Xpath is used to navigate through elements and attributes in xml and html documents.  Xpath uses Xpath Expressions to select nodes or node sets within a document. Example 1 .  Looking for all of the <span> tags within an html document. xmllint -- html -- xpath " // span" StedmanLesson10.html xmllint = This tells the command line that we are going to be using the xmllint language. space = because we always have space in between commands -- = Remember, these are the two hyphen-minus characters that we need to tell the command line that we are going to use an xmllint option. html = This is the xmllint option we want to ...

Back To The Basics

It's Been A LOOONG Minute since I have coded!!   Even so, I decided to give JavaScript another try.  I always seem to do good and then when I get to this one area, I always seem to hit a brick wall.  Well....nothing like getting back up and trying again right?   I decided to try:  The Complete JavaScript Course 2025: From Zero to Expert! by Jonas Schmedtmann.   So far, he seems to explain things in a way my brain understands it.  ๐Ÿ’ To let you know how much I have forgotten in the coding world, I couldn't even remember how to write the basic commands for an HTML document! Yesterday I started the fundamentals free course and I am so glad that I did.  Because of time, I only made it through the JavaScript History and Setup chapter, but that chapter was enough to get my memory flowing again!   It started to feel familiar and I quickly remembered why I enjoyed coding so much.  Yesterday and this morning, I just erased and...

XMLLINT for HTML: Cleaning up the HTML Code

Getting That MESS Cleaned Up! In an earlier post, we learned about xmllint .  Today, I want to talk about cleaning up the code for an HTML file. When we have an xml file, xmllint is used.  For an html file, we use the following command in the command line: xmllint --html <filename goes here>         Here is an actual command on my command line for running xmllint for my StedmanLesson10.html file. In the photo above, you see that I start off the command with xmllint. The next thing is a space and then a --html.  The two -- are two hyphen-minus characters that are used to specify long options (Basically there are options that can be used within xmllint.  The two hyphen-minus characters are saying an option is going to be used.  In this case, that option will be html - because we are going to do an xmllint on an html file). After that you see a space and then the name of the html file I want t...