Apparently, very many users of computer systems of any type know that you can create a local server on your computer yourself in a matter of minutes. True, not everyone has a clear understanding of the foundations of the methodology for taking all steps. So let's try to give at least partial information on how to create a local server and adapt it to your own needs.
The concept of a local server
In general, initially you need to clearly distinguish between the created local servers by type. In addition to the most commonly used web severs, you can create and configure game, proxies, and even DNS servers yourself. It all depends only on which function will be assigned to one or another component.
However, in most cases, all these components have one thing in common: they are created initially on local machines in the first stages without being placed on a remote hosting, which allows them to be configured and edited directly on their own computer terminals.
Now let’s try to consider issues related to how to create and configure a local server on the computer, depending on its type and purpose
Software selection
In principle, the choice of software is a personal matter for each user. It is worth noting that if, for example, when creating a local web server, only hypertext markup languages such as HTML or CSS are used, it does not make sense to install software packages additionally, since any Internet browser perfectly understands them.
Another thing is when additional components are scripts written, say, in PHP. It’s worth using them, and the browser can no longer cope. This is where specialized software comes in handy. As for proxies, DNS, and game servers, the situation here is also ambiguous. A little later we will consider the simplest applications for creating and configuring them, but for now let us dwell on the main question regarding standard local web servers.
How to create a local server: installing and configuring the Denwer package
If you decide to start creating a local server for subsequent hosting on a remote hosting, you will naturally need some kind of tool. Most often, when searching for the appropriate software on the Internet, users get redirected to download the Denwer software package, which is a domestic product and also simple enough to understand and work with.
It contains all the necessary tools like Apache, PHP, MySQL, phpMyAdmin, sendmail, etc. The only drawback is that it will additionally have to install special engines like Joomla or WordPress in the simplest version.
So, the creation of a local server begins with the launch of the installation EXE-file (naturally, on behalf of the Administrator). A window similar to the DOS mode appears. Follow the instructions of the installer. First, select the location of the server data, then assign the letter and the virtual disk mode (in principle, the proposed parameters can not be changed). This completes the installation. Now the local server needs to be checked for correct functioning.
Health testing
At this stage, we launch the created server, and in the window of any Internet browser, enter http: // localhost. If the program is installed without errors, the browser will display a message stating that everything is working.
If you scroll down the page, you can see the main links through which you can conduct a full test of the local server.
Encoding Issues
Sometimes you may encounter an unpleasant situation when the sent e-mail message looks like a set of strange characters. This happens only because the program was originally designed for UTF-8 encoding. It can be completely elementary changed, for example, to KOI-8R or something else.
Installing a local server: additional engines
Now another important point. The local server of Windows-systems cannot do without special add-ons called engines (WordPress, Joomla, etc.).
First, in the www folder located along the path \ home \ local host, in the main directory, create an arbitrary directory. After that, enter the path http: // localhost / in the address bar of the browser and check what exactly opens. If this directory is opened , everything is fine. We copy the engine files to this directory using any file manager (at least the same "Explorer") and enter the address again. The “Installation Wizard” window appears, where you just follow the instructions.
Database Addition
Now the local server should attach special databases. To do this, use the phpMyAdmin service, which is accessed by entering http: // localhost / tools in the browser address bar. First, the section for creating a new database is selected, it is given a name (it can be arbitrary, but it is better to specify the same one that was used for the folder in the previous section).
Then we return to the main page and configure the privilege settings (create a new user, specify the username and password, use localhost as the host and mark everything in the window with “birds”). It remains to press the button "Go!" and wait for the end of the process.
Migrating a local server to hosting
The next step is to connect the server to the local network and transfer to the hosting so that it becomes available to users on the Internet. The “native” way of transferring data to a remote resource does not look very convenient due to many additional actions.
Setting up the local server in terms of transferring data to remote hosting is best done by the FileZilla application, with which you need to copy the files in the above directory to the root directory of the host. This is either the PUBLIC_HTML folder or the HTDOCS section. Now the thing is small: we change the so-called absolute paths to folders and files and directories in the engine settings, indicate the name of the database that is supposed to be used already on the remote host, and specify a new login with a password for the host. All. On this work is completed. Connecting to the local server of user machines can be done through any Internet browser.
Local proxies
Now let's see how to create and configure a local proxy server. What is it for? Firstly, with its help you can track absolutely everything that is downloaded to a computer terminal or laptop during Internet surfing. And secondly, this way you can save traffic if it is paid.
The local proxy server works on the principle of caching calls to DNS servers and saves, say, pictures or any other objects, and when you visit a resource again, it loads it from its memory, so to speak, accelerating access to the resource.
To create a server of this type, you need the simplest HandyCache application, which should be placed in a convenient place for quick access, since with every session of connecting to the Internet you will have to access it.
Before you begin, you must configure the proxy settings. For example, if you use the Opera browser, you need to specify 127.0.0.1, 8080 for the port in the server parameters for HTTP. Now we launch the application, go to the settings and look at the “Dialer” tab. As a rule, the program itself determines what type of connection is currently being used. Next, click the button of the same name and use the created server.
Yes, please note: in the cache settings you can specify a size of the order of 300 MB. In theory, this should be enough for all occasions. You can view the contents in the Cache folder of the main directory where the program was installed. And one more thing: remember, this is a normal proxy server, not anonymous, so you should not expect from it a change or hiding the IP address.
Local DNS servers
You can use the local DNS server in cases where the connection is unstable, the local network has too much TCP / IP branching, or you are engaged in web development and testing. In principle, the BIND program is perfect for such purposes. Although it is mainly designed for UNIX-like systems, it nevertheless works perfectly with Windows (we assume that the terminal does not have a server version of Windows installed, which can be configured in the Control Panel).
Run the installation file and follow the instructions. For convenience, it is recommended to install the program directly on the C drive, in the created BIND directory. Next, enter the username and password, after which we activate the installation process and wait for it to complete.
Now in the C: \ BINDetc folder you need to create a file "name" .conf, in which the settings that will be used by the local DNS server (the name is arbitrary and specified without quotes) are written. In order not to waste time, you can easily find the file you need on the Internet and download it by placing it in the specified location.
Now reboot the system, then call the command line (cmd via the Run menu or a combination of Win + R), where we write the nslookup request. If confirmation occurs, then the server is installed correctly and works without errors.
Local game servers
Finally, consider another type of server. This is a local server for games that use online mode within the local network. Let’s explain what it is with the example of Minecraft. To do this, download the server itself from the official website of the game and use the Hamachi application. A prerequisite for correct operation is the presence of the installed JAVA package in the system with the latest updates.
To configure, we use the server.properties file, where we add the data provided by the Hamachi application. We write down the server IP address, number of players, use of possible game modes, etc. In the online-mode field, you must specify the value true. After that, save the changes and close the file.
Now we define the internal IP server that will be used by the players when connecting to the terminal on which it was created. Computers, of course, must be combined with the server itself either through a local network or through a VPN. The IP address of the server terminal must be static with a binding to the MAC address.
Logging in is carried out using the Minl2 application, where during registration a login and password are indicated. After the done actions, we leave the server and enter again, but already in offline mode using the created login and password. In the settings section, select Multiplayer and enter the desired IP server. All. You can enjoy playing with a real opponent.
Conclusion
Of course, this is not all the nuances that may arise when creating local servers of various types, and, of course, not all programs that help in this process. Let's put it this way: these are general and basic principles embedded in such technologies. And if you look, there’s nothing particularly complicated here. A little time and patience - and a local server of any type will be created within 10-15 minutes.