🔻

CreateaFreeWebsite

Localhost Server

What is a Localhost Server?

The process of developing interactive websites can be simplified with the use of a localhost server.

Web servers are actually machines that store web sites on the internet.

The software programs that control the access of users to those web sites are also referred to as servers.

The most popular of those programs is the free Apache server.

You can download and install the Apache Server on your Windows or Linux machine, and create an environment similar to the internet right on your computer.

When you run the server on your computer without an actual connection to the internet it is called a localhost server.

Why do I need a localhost?

You must be running on a server to process your HTML forms on your PC.

When you build a form its action statement calls a CGI script to process the data entered in the input boxes on your form.

The most popular scripting language is PHP.

The viewing browser must be able to access a server in order to find the interpreter that processes the scripts.

Is a localhost server hard to install?

It can be very difficult. It doesn't have to be!!!

Windows Users
Enter IndigoAmpp

IndigoAmpp makes installing the Apache server on your PC just about automatic.

I've installed it on Windows XP, Vista and 7 without a hitch.(Can you tell how old this page is?)

And IT'S FREE!!!

I recommend Indigo AMPP ( Apache/Perl/Php/Mysql) for tech-dummies like myself.

Download and Install. Instructions for using it are on the download page.

Linux Users

Linux users can install the Apache2 server from the repository.

This can be a confusing experience for the non-tech mind, but there are some work arounds we can use to dummy it down until you get some experience using it and want to extend your knowledge which includes configuring owners and users.

FIRST: It's a good idea to make sure the software on your system is up to date.

From the terminal run: sudo apt update then when it completes, run sudo apt-get upgrade.

The Apache2 Install

To see if it installed properly, open one of your browsers and type localhost in the address bar and hit Enter.

You should see a Welcome screen that tells you everything is A okay.

The welcome page is located in the var/www/html folder. This is the folder where you'll store the forms and scripts you want to test.

To access the folder:

With the elevated permissions you'll be able to copy and paste , save from editor or drag your forms and scripts into the var/www/html folder.

To edit the forms and scripts, right click on the desired file (inside the var/www/html folder) and choose Open with. Choose your desired editor to proceed. I recommend Geany for use with your localhost.

The PHP Install

Return to the Software Manager

Just to be sure you have the current versions of Apache2 and PHP, visit the terminal again and run sudo apt update again.

Now from the terminal run sudo apt install php libapache2-mod-php

If you get a message like newest version already installed, 'voila', you're ready to work.

See: Using the Localhost (Editing files and Browsing)

 

🔺