If you are developing your own service or site, it is not necessary to do it “live” – to buy a domain and hosting. It is also not necessary to test changes in the functionality or design of the site in real-time, on a working project.
Moreover, you can have an unstable Internet or you do not want to put the site on the Internet, but make a small project for yourself or an intranet … All this can be done on a local PC.
But how? This question is answered by the local server, which will save you from all the above-mentioned problems. The task of local servers is to provide usability of the sites, to provide the possibility of development on the local PC.
Local server – what is it?
A local server is a program that creates a full-fledged web hosting environment on your PC.
That is, mini-hosting is created on your home computer, on which all server engines, scripts, CMS ( WP, Joomla, and others) will function successfully. You do not even need to connect to the Internet – you will have your own mini-Internet with one or several sites.
So with the help of a local server, you can successfully engage in the development of the Internet.
Most of the sites of the modern Internet are dynamic and work mainly on PHP. PHP is also often used to teach programming. But browsers only understand HTML and CSS, and PHP does not. Because PHP is a server programming language and the server just converts and processes PHP code (or the result of its execution) into a form of understanding to the browser.
And such handlers are on each server, but not on your home computer.
The need for local servers was constantly growing when developing dynamic sites in PHP, Perl, and other programming languages. First, it was due to the poor and expensive Internet, then people realized the need to test scripts in a special environment, and in general, the amateur and professional interest in programming have grown.
To fully simulate the webserver and solve all the above tasks, a local server was created.
Usually, these problems were solved, and still are solved, by means of the FTP client. You download a file from a web host, edit it, upload it back, see – it works as it should or not. If it does not work quite as expected, we repeat the procedure.
This is at least inconvenient – you need to be constantly connected to a stable Internet, you need to wait while it is downloading back (the file may be large, there may be several), you need to constantly edit the files when “something goes wrong”.
A local server that is configured identically to your web server simplifies this process. On web hosting, you upload only the final, final version of the site files.
Even if you do not work with PHP code, but make a static HTML site, there is a difference between the usual viewing of HTML files in the browser and their browsing “through the local server.”
Compare at least the URL when browsing through a web browser:
And through the server:
The latter option is not only more realistic visually in the browser line, but also handles HTML / CSS code correctly (because the code is processed by the server, and not opened for viewing), loads all scripts from the Internet – without errors and overlays.
So it goes. It’s good that in 2016, as never before, you just choose a local server for your needs. Now I will tell you about some of them, the most popular and working without problems.
In my webmaster practice, I worked with Denwer, OpenServer, and Winginx. The last two periodically use so far – both are installed on the desktop and run as needed.
For what? For example, in order to create a business card site on WordPress for a couple of hours on the PC. Or prepare a prototype site for HTML or WordPress – the working version is then downloaded to the Internet and filled with content.
Denwer local server
Denwer is one of the most popular local servers.
It stands for “a gentleman’s set of web developers” – a set of distributions and software for web development on a local PC.
Denwer is one of the oldest local servers widely known in the Runet, one of the main advantages of which at the time of its appearance was the ability to work with a flash drive. Now there are other local servers that are not inferior in functionality.
Immediately after the installation of the local Denwer server is completed, you will be able to start and install the engines of your web projects on the Apache server. Working with a local server is no different from working with real hosting.
The Denwer installer
In the days of Windows 95/98, you had to spend quite a bit of time to step-by-step manually install the components that are included in the Denwer installer today. Now this laborious and time-consuming process is a thing of the past – an automatic installer, a convenient configurator, and easy updating of components make the life of the average user many times easier.
The basic Denwer installer package includes Apache (webserver), PHP interpreter, MySQL databases, and PHPMyAdmin for database management, Perl interpreter, SSL, email server simulation, etc.
Denwer is quite compact – if you download the distributions separately, you will get about 40 megabytes. The Denwer distribution takes up to 5 times less space – 8 megabytes. This optimization was achieved due to the fact that the developers of Denwer threw out all unnecessary (including instructions, manuals) – left the most necessary and suitable for 90% of web developers and webmasters. The remaining 10% easily prove the missing packages with the built-in installer.
In Denwer, there is a built-in management system for hosts (virtual) based on templates. Creating a new host is done by adding a new directory in the / home directory. At the same time, there is support for the names of the directories of many Asian hosters, which makes it possible to transfer painlessly the project developed on the local server to real web hosting.
Architecture of Denwer
Denwer is completely autonomous. You install it in the selected folder, and outside of it, Denwer does not touch anything. Started – running, turned off – does not work and leaves no traces behind.
Technically, you even have the ability to put two. Denwer in two different folders – local servers will not conflict.
Denwer does not even need to uninstall if you decide not to use a local server or switch to another one – Open Server or Winginx. Delete the directory (folder) of Denwer – and you’re done. Similarly, with the transfer to other machines – move the folder to another PC or to a USB flash drive. Denwer will work there, with the configuration of you already configured and the extensions packages.
From the inside, Denwer is similar to “a small Unix” – at the start of the main directory a folder is attached to the disk with the location of directories as in Unix: / home, / usr, / tmp. You can work with both folders without slowing down the OS.
Local server OpenServer
Open Server (Open Server) is a software environment that creates a portable local server platform.
Open Server is designed specifically for web developers and takes into account all received recommendations and wishes for the environment. Thanks to this, Open Server is widely used in Asia for testing, debugging, and developing from scratch various web projects and creating full-featured web servers in local corporate and home networks.
The local Open Server has:
- Well-thought-out user interface;
- Multifunctional options for configuring embedded components and their administration;
- A complete set of modern server software.
The above-mentioned advantages, as well as trouble-free working capacity, make Open Server a first-class and reliable tool for webmasters and web developers. Indeed, the Open Server is installed and used in real-time for tens of thousands of users – this we can judge by the meter on the main page of the site, which fluctuates between 10,000 and 20,000 users.
And the total number of downloads of the distribution is inexorably approaching one million.
And all because the bundle of components for the webserver turned out to be not only easy to use for Windows users, but also free, and also reliable – at the level of Linux.
The purpose of the local server Open Server is the same as that of Denwer and other local servers – independence from the workplace.
Portability of the assembly consists in the fact that there is no need to re-install the programs when changing the workplace – just connect a USB flash drive or an external hard drive with the installed and configured Open Server working environment.
I recommend using the basic version of the Open Server, which is an analog of Denwer, Vertigo, Xampp – contains only the server part, without additional databases, Geeta, and programs for webmasters.
Local Winginx Server
Winginx is this:
- The quick and easy launch of the local nginx server to the Windows operating system;
- Convenient local development of sites and services on Node.js and PHP;
- Multi-project system for development, which has universal and flexible settings, easily updated components;
- The environment for project management – you can create tasks and take into account the time for their implementation;
- The environment for local testing and launch, web applications, sites, and browser services;
Winginx features in addition to other local servers: a single server management center and component updates, simultaneous multi-project work with several sites (including using different versions of PHP), task and project management, time tracking for tasks, downloading free CMS from store Winginx and their installation “in 1 click.”
Server Manager and Winginx Update Center
Winginx does not load a local computer, stealthily working in the tray. If you click on the Winginx icon, a single server management center will be displayed. In it, you can stop or start the entire server or its individual components.
The new version of Winginx has a context menu. Guys developers have simplified it.
The update center in Winginx monitors the relevance of the server components. If you need to add additional components or update obsolete. And it works automatically when you run it, it checks to see if you need to update it and, if necessary, notify you about it. You can only agree (or not).
But do not worry about automatic updates that might disrupt the operation of your local project. Only with your consent.
Project Management and Tasks in Winginx
The new Winginx offers web developers the opportunity to simplify work on projects with a simple and convenient task manager built right into the control panel of the local server.
Accounting for the time spent on development
The time tracker, integrated with the task manager, allows you to take into account the time spent by all developers on the project. This can be your time, or the time of colleagues, which you need to calculate for payment or calculation of productivity, the efficiency of work on tasks.
Winginx Web Application Store
In Winginx is also built so-called. “Score”. This is a panel that offers the download and installation of popular site engines.
At the moment, this is the most popular blogging CMS, engines like “Wiki” and some frameworks for web development:
You select the engine, it is loaded and installed in the selected folder (you can use the already configured domain or create a new one), then the installation wizard starts, and then everything is simple. Five-minute installation WordPress and all that.
That’s all, gentlemen webmasters and novice developers. Finally, I remind you that backups of local servers also need to be done. Suddenly, Windows or the hard drive will fly off, and you have a project for the customer there. Do not neglect the backups.
The wisest Greeks also said: “If you want to be strong – make backups, you want to be beautiful – make backups, you want to be smart – make backups.”