Install a web server on the cloud

The LAMP stack is a popular open-source solution stack used primarily in web development.

LAMP consists of four components necessary to establish a fully functional web development environment. The first letters of the components’ names make up the LAMP acronym:

  • Linux is an operating system used to run the rest of the components.
  • Apache HTTP Server is a web server software used to serve static web pages.
  • MySQL is a relational database management system used for creating and managing web databases, but also for datawarehousing, application logging, e-commerce, etc.
  • PHP, Perl, and Python are programming languages are used to create web applications.

Each component represents an essential layer of the stack. Together, the components are used to create database-driven, dynamic websites.

Follow the following instructions from AWS documentation to install a web server on your AWS instance.

Front-end Development

To refresh your knowledge on front-end development, you may go through the 4 part crash course:

  • Part 1
  • Part 2
  • Part 3
  • Part 4


Back-end Development

Back-end refers to the server side of web development. In other words, the server can serve multiple clients (or computers). Although HTML/CSS/JS provides a rich user interface, it runs entirely on clients’ machines; in other words, it is completely decentralized and agnostic of different clients, which is a limiting factor. What if you want to perform some computation that relies on multiple clients? Say you want to show how many items are available in stock based on online customer records. Then you would need a server that aggregates the computation. LAMP (Linux, Apache, MySQL, PHP) is a software stack that allows running server-side applications using primarily PHP language (and another language), along with MySQL database and Apache server, which orchestrates HTTP communication.

In the next classes, we will learn how to develop a simple back-end for your robotic applications. By simple we mean using basic commands and tools in Linux avoiding specialized software and libraries as much as possible.

Optional

Native Python Server

Django and LAMP are technologies for back-end development that involves lots functionalities and performs security checks. If you don’t need all these, and you want a simple server for prototype, you may use ptyhon’s native http.server library. Below is a short video tutorial.

Flask

Flask is a small and lightweight Python web framework that provides useful tools and features that make creating web applications in Python easier. It gives developers flexibility and is a more accessible framework for new developers since you can build a web application quickly using only a single Python file. Here is a video tutorial. Flask has it’s own lightweight web server, but it is not suitable for production. You can run Apache with Flask by enabling mod_wsgi

Django

You may try Django framework that allows python for backend development using python

PHP

PHP is an old technology for back-end development and is tightly integrated with Apache. (I am personally not a big fan of PHP though.). Follow video below Learn PHP in Under 15 Minutes! and run experiments in your AWS server.

For more in-depth tutorial, you may follow W3 School tutorial.