How to start a local server. Local Open Server - installation and configuration, working with WordPress


Articles in the same category

Concise and easy to understand OpenServer installation. Here we will configure the Database correctly and make WordPress installation to local Open Server.

This local server free, for which many thanks to the developers. These modest guys, however, do not intrusively offer to make a donation of any amount for the development of the project. I think this is very noble towards us and I think this donation should be made.

Download the Open Server program

You can download Open Server at . The downloaded archive is self-extracting. At startup you will be asked to select a location for unpacking. You can specify any place, even external media in the form of a flash drive or portable hard disk.

Also, during installation there will be no shortcut on the desktop and in the start menu. The program is portable.

Choose any of the three distributions, I described them in.
Fill out the captcha and download.

After installation the folder will look like this

I advise you to install a shortcut in the taskbar. It will be convenient to launch the program.

Don't look for the program in Program Files, you won't find it there. It, as I already said, is portable and runs only from the folder where you installed it. Therefore, the shortcut should only be looked for there.

Put the meme on the shortcut in the taskbar and wait a while. The program will not show any signs of its operation when loading its necessary files. After a minute, a yellow flag will quietly appear in the tray (bottom right, near the date and time).

If it does not appear, click the arrow next to it, find the checkbox, after which the server will boot, and now by clicking the green flag in the tray, start Open Server.

A small but essential step. If you use Skype, you need to log into it, and go to settings, Tools - Advanced - Connection, and uncheck the checkbox, as in the screenshot

This will allow the Open Server to run without problems occupying its ports.

And further. The server will create for itself virtual disk, so don’t be surprised what appears in your explorer additional disk. It will disappear when you log out of the local server.

Creating a website in Open Server

Now you need to go to the folder where you defined the location for Open Server. Open the domians folder, you will have one localhost folder there.
Create a new one, for example test.ru .

And now we will install the engine on this domain wopdpress.

First of all, download WordPress from the official website.

The archive that you unpack in the same folder will be downloaded Downloads and open the unpacked folder.
Select all folders and files and copy to the clipboard. Then open your new site folder test.ru and paste all these folders there.

Then open the file from this folder under the name wp-config-sample.php text editor Notepad++ or just use notepad and edit the code.

Now, in order, what we edit.
But first we will create a Database. To do this, we will take a break from editing, and then we will return to this step. It is important to create the Base, because we will enter the name of the Base in this batch file.

Database Installation

We go to the Open Server menu by clicking on the flag in the tray and open PhpMyAdmin in the server menu itself.

A login window will open, where in the User window we enter root, leave the password blank, OK.
We entered the program where we will create a database for our virtual site

We assign the name base, in our case mywordpress, and set the database format utf8_general_ci. Create.

We have created a Database for our website.

Now we return to editing the file from where we were distracted to create the Database.

Fill in the same way as the red squares are highlighted. Except for the big one.
This is unique to us arbitrary code. You can create it by following the link indicated by the arrow. Just copy the URL and open it in a new window, you will be offered a unique code, which you can copy and replace the one you had by default. All.

Save your changes and close Notepad or other editor in which you are editing the code.
Now change the file name from wp-config-sample.php on wp-config.php.

That's all.

Go to tray, restart (yellow flag) server IT IS NECESSARY!
Then log into the server again, still in the same tray, and go to My Sites. There you will find your test.ru.
Click and you are on the site. The installations will start WordPress engine. Give the site a name, for example My blog . Just create a login admin5. And the password. Make it simple, this is a test site after all and we are not afraid of hacking.



After which we can dial test.ru/wp-admin, enter our username and password

And we get to the admin panel

And if in address bar let's dial test.ru then we'll get to the site

Our local server with the new test site is ready. Let's get started with work and further training.

And all the best!

Work hard! The world will not be a paradise for those who want to live as lazy people. Sachs Hans

A few days ago I was once again visited by a thought. The idea was not new and quite intrusive: “let's switch to Windows8. Well please." And since there was no way to drive her away, I stocked up on tea and cookies and got started.

For installation of the system and all necessary programs it took no more than two hours, but then the most interesting moment came: I needed to deploy a working environment, namely GIT + local server (Apache, MySQL, PHP, nginx, memcached, mongodb). Remembering the experience of previous installations, this time I decided to document the entire process and save it for posterity.

Disclaimer number one:“I’m not a programmer” (c), but an interface designer and front-end technologist (but in some cases I can help my colleagues and code something like that, and even then they won’t beat me for it)

Disclaimer number two: Yes, I perfectly imagine that in Ubuntu all this is done much faster. But I work on Windows, this is how it historically happened.

So let's get started.

Our work plan includes installation of the following products:

  1. PuTTY
  2. Denwer (Apache, MySQL, PHP)
  3. Nginx
  4. Memcached
  5. MongoDB

1. PuTTY

PuTTY- freely distributed client for various protocols remote access, including SSH, Telnet, rlogin.

PuTTY includes several utilities, but in my work I only need it and Pegeant (an SSH authentication agent that stores keys to git repositories).
Offsite:
If you don't need any SSH, forget about this point and move on.

2.GIT

To work with git I've been using it for years now TortoiseGit, which is stable, flexible and covers all my needs by 146%. In general, I recommend it.


Offsite:

2.1 TortoiseGit requires git for Windows, which can be picked up on Googlecode;
2.2 myself TortoiseGit install from here

3. Denwer

Denver- Gentleman’s Web Developer’s Kit (“D.n.w.r”, read “Denver”) - a project by Dmitry Koterov, a set of distributions (Apache, PHP, MySQL, Perl, etc.) and shell, used by Web developers to develop websites on a “home” (local) Windows machine.
Offsite:

3.1 Installation

We will need to download basic kit and additional PHP5 modules.

Lyrical digression:

no, not just download, but receive download links by email! That is, you will have to enter your email, as well as your first and last name, twice in the form under the large “Registration” heading. “Registration is required due to the future release of Denver 4.” For many years now the form has been apologizing, but I don’t believe it anymore(.

Usually, installing Denver is quick and painless, but on Windows8 I was attacked by an error that complained about a missing library msvcr71.dll. You can put the library in a folder "\Windows\System32\"(x32) or "\Windows\SysWOW64\"(x64). After the file is in the folder, open its properties and click the “Unblock” button.

3.2 Functional check

After installing Denver, we will create a test script, which will be used to check the functionality of everything that we will install later.
Let's go to Z:\home and add a new site: create a folder test.local, there is a folder in it "www", to which we add the file index.php with incredibly creative text:

";

Restart Denver, open in browser www.test.local, get impressed and move on

4. Memcached

Memcached- middleware that implements a data caching service in RAM based on the hash table paradigm.

Memcache- PHP extension, provides a convenient procedural and object-oriented interface to memcached, a highly efficient caching daemon that was specifically designed to reduce database load in dynamic web applications.

4.1 Installing memcached

A. download the archive with the binary: Memcached 1.4.5 for Windows from here
IN. \usr\local\memcached

4.2 Installing memcache

A. download the archive with the library from here
IN. unpack the contents of the archive into \usr\local\php5\ext\
WITH. open the file php.ini (\usr\local\php5\php.ini) and connect the extension:
extension=php_memcache.dll

4.3 Configuring the launch of Memcached along with the launch of Denwer

To run the script with Denver we need:
  1. write a script containing commands to start and stop the application/service and put it in a folder \denwer\scripts\init.d
  2. create a link to this script in the startup/stop configuration folder \denwer\scripts\main\

A. create a file named “memcached.pl” in the directory \denwer\scripts\init.d\
#!perl -w package Starters::Memcached; BEGIN ( unshift @INC, "../lib"; ) use StartManager; my $basedir = "/usr/local/memcached/"; chdir($basedir); StartManager::action $ARGV, start => sub ( ### ### START. ### print "Starting memcached\n"; system("memcached.exe -d"); print " Started!\n"; ), stop => sub ( ### ### STOP. ### print "Stopping memcached\n"; system("TASKKILL /F /IM memcached.exe"); print " Stopped!\n"; ); return 1 if caller;

B. Now let's create a link to the script - a regular text file containing instructions that when starting, restarting and stopping Denver, you must execute init.d/memcached.pl
IN text editor we write
init.d/memcached
and save the file under the name "40_memcached" to the following folders:

  • \denwer\scripts\main\start
  • \denwer\scripts\main\stop
  • \denwer\scripts\main\restart

4.4 Checking the result

We add to our test script (index.php):
$memcache = new Memcache; $memcache->connect("127.0.0.1", 11211); echo 'Memcache ver: ' . $memcache->getVersion();

Let's restart Denver and see what happens

5. Nginx

Nginx- a simple, fast and reliable server, not overloaded with functions.

Offsite:

5.1 Setting up Nginx

A. download the Windows version from the offsite and unpack it into \usr\local\nginx
B. setting up a virtual host for our test site. To do this we open \usr\local\nginx\conf\nginx.conf and add it there

Server ( listen 127.0.0.1:80; server_name www.test.local test.local; if ($host = "test.local")( rewrite ^/(.*)$ http://www.test.local$1 permanent ; ) location ~* \.(jpeg|jpg|gif|png|css|js|pdf|txt|tar)$ ( root Z:\home\/test.local\www; ) location / ( ssi on; proxy_pass http ://127.0.0.1:8080/; proxy_set_header X-REQUEST_URI $request_uri; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $remote_addr; proxy_set_header Host $host; proxy_connect_timeout 60; proxy_send_timeout 90; proxy_read_timeout 90; proxy_ redirect off; proxy_set_header Connection close; proxy_pass_header Content-Type; proxy_pass_header Content-Disposition; proxy_pass_header Content-Length; root Z:\home\/test.local\www; ) )
This is an example of settings from a real project, your settings may obviously vary.

5.2 Setting up Apache

By default, Apache runs on port 80, but we just gave this port to Nginx, so now we need to change the template for the virtual host in the Apache settings and assign it a port other than 80 (for example, 8080).
Opening \usr\local\apache\conf\httpd.conf and change the port number

## ## START OF VIRTUAL HOST TEMPLATE. ## ## If you want Apache to run on a port other than 80 by default, ## change the port number in the next directive. ## #Listen $&(ip:-127.0.0.1):$&(port:-8080) #NameVirtualHost $&(ip:-127.0.0.1):$&(port:-8080) # # DocumentRootMatch "/home/(?!cgi-)(.*)^1/(?!cgi$|cgi-)(.*)" # DocumentRootMatch "/home/(?!cgi-)(.*)/ public_html^1" # DocumentRootMatch "/home/(?!cgi-)(.*)/public^1" # DocumentRootMatch "/home/(?!cgi-)(.*)^1/html/(.*) " # DocumentRootMatch "/home/(?!cgi-)(.*)^1/domains/(?!cgi$|cgi-)(.*)" # DocumentRootMatch "/var/www/html/(?!cgi -)~(.*)^1/(?!cgi$|cgi-)(.*)" # DocumentRoot "$&" # ServerName "%&/-www" # ServerAlias ​​"%&/-www" "% &/-www/www" $&(host:-) # # $&(directives:-) # # ScriptAlias ​​/cgi/ "$^1/cgi/" # ScriptAlias ​​/cgi-bin/ "$^1/cgi -bin/" # AllowEncodedSlashes on #

5.3 Configuring Nginx launch along with Denwer launch

A. create a file named “nginx.pl” in the directory \denwer\scripts\init.d\
#!perl -w package Starters::Nginx; BEGIN ( unshift @INC, "../lib"; ) use StartManager; my $basedir = "/usr/local/nginx/"; chdir($basedir); StartManager::action $ARGV, start => sub ( ### ### START. ### print "Starting Nginx\n"; system("start nginx.exe"); print " Started!\n"; ) , stop => sub ( ### ### STOP. ### print "Stopping Nginx\n"; system("nginx.exe -s stop"); print " Stopped!\n"; ); return 1 if caller;

B. write in a text editor
init.d/nginx
and save the file under the name "50_memcached" to the following folders:

  • \denwer\scripts\main\start
  • \denwer\scripts\main\stop
  • \denwer\scripts\main\restart

5.4 Checking the result

Place the file next to the script style.css with content
h1( color: red; ) h2( color: green; )

And we will ennoble our index.php:
Test me

Test me

Memcached

connect("127.0.0.1", 11211); echo "Memcached ver: " . $memcache->getVersion(); ?>
Now we restart Denver and admire the result. If the CSS file is connected, Nginx works fine.

6. MongoDB

MongoDB- document-oriented database management system (DBMS) with open source code, which does not require a description of the table schema.

Offsite:

6.1 PHP driver

A. Download the library php_mongo.dll from this site: and put it in a folder \usr\local\php5\ext\
Through trial and error, it was found that a suitable driver is contained in the archive mongo-1.2.5.zip/mongo-1.2.5-php5.3vc9ts.zip. If for some reason it doesn't start, try other versions.

B. connect the extension to php.ini
extension=php_mongo.dll

6.2 Installing Mongo

A. download the archive from Mongo and unpack it into a folder \usr\local\mongodb . In the same folder we create two more folders:

B. install the service
> cd C:\WebServers\usr\local\mongodb\bin\
> mongod.exe --install --dbpath=C:\WebServers\usr\local\mongodb\db\ --logpath=C:\WebServers\usr\local\mongodb\logs\

6.3 Setting up MongoDB to launch in conjunction with Denver

A. create a file with the name "mongod.pl" in the directory \denwer\scripts\init.d\
#!perl -w package Starters::mongoDB; BEGIN ( unshift @INC, "../lib"; ) use StartManager; StartManager::action $ARGV, start => sub ( ### ### START. ### print "Starting mongoDB\n"; system("net start mongoDB"); print " Started!\n"; ), stop => sub ( ### ### STOP. ### print "Stopping mongoDB\n"; system("net stop mongoDB"); print " Stopped!\n"; ); return 1 if caller;

B. write in a text editor
init.d/mongod
and save the file under the name "60_mongod" to folders already familiar to us:

  • \denwer\scripts\main\start
  • \denwer\scripts\main\stop
  • \denwer\scripts\main\restart

6.4 Checking the result

Let's launch the mongo console interface
> Z:\usr\local\mongodb\bin\mongo.exe

And we will insert and output the test value into the “test” database
> db.test.save(( name: “Habr!” ))
> db.test.find()

The result should look like this:

6.5. Installing the Mongo database management interface

There is a list and short reviews of admin panels on the MongoDB website, so you can choose according to your taste.
I chose RockMongo for myself, so with its help we will finally make sure that everything works for us and does not crash anywhere.

A. download the archive with the admin panel from this page. Naturally, we choose Windows version. At the time of writing this article RockMongo-on-Windows v0.0.4

B. take a folder from the archive \rockmongo-on-windows\web\rockmongo and copy it to the directory of our test site
Opening config.php and change the value of the parameter
$MONGO["servers"][$i]["control_auth"] = true;
on
$MONGO["servers"][$i]["control_auth"] = false;

C. Check the result using the link www.test.local/rockmongo/index.php

Congratulations! Now we are completely and irrevocably well done.

Bonus #1. Working with php from the Windows console

Perhaps it will be useful to someone. It came in handy for me when our evil tech lead decided that “SQL files are a thing of the past, let’s use migrations.” Of course, for the sake of decency, I tried to feign complete misunderstanding and even shed a tear, but I was exposed and sent to figure out how it works on Windows.
It turned out that all you need for happiness is register PHP directory in PATH.


Click on “Edit” and add to the end of the line
;Z:\usr\local\php5

Now let's check that everything worked.
Let's create a file in the directory of the test site console.php

Open the console(you can directly from the same folder - right-click with SHIFT pressed on an empty space and select “Open command window”).
Enter:
> php console.php “UserName”

The console responds:
> “Hello, UserName!”

PHP is defeated, general rejoicing, applause, curtain.

Bonus #2.

All files and examples mentioned in the article in one archive for free without SMS: on Github

I hope that this material will be useful.
I would be grateful for comments and suggestions.

Tags: Add tags

Greetings to all readers of the blog site. This article will focus on the local Open Server.
What is a local server and what is it for? Local server is a special program that gives us the opportunity to work on our Internet project directly on our home computer.

Test your site, try out different features on it, bring it to mind, while being able to observe how the project will look in browsers after publication on the Internet. And only after we bring our brainchild to fruition, do we let it float freely.
A local server is one of the tools that should always be at hand, even after everything on the site we created has been checked, working, and published.

Improving the appearance of a website and its functionality is a fascinating and lengthy process, and for many, eternal. And performing any experiments in this direction directly on the working site is not good.
This means that the process of any innovations must be tested and tested on a local server. And after that, we upload the changed files to our working website via an FTP client.
The most popular local server among WEB developers is Denver. I work with him, my beloved, all the time. There are other local servers besides Denver, but I'm not familiar with them yet.
Why am I writing specifically about the Open Server portable server system, and not about Denver. Yes, because lately Open Server has become increasingly popular. More and more often we come across positive reviews and comments about how convenient and cool it is. And I can't get past this. Therefore, today I am installing the Open Server software environment on my computer, at the same time, telling step by step how to do this in this article.

Open Server which version should I choose?

All versions of the local server are portable and do not require installation. This means that Open Server can be downloaded to a flash drive or portable hard drive and used anywhere, on any computer.
Three distributions of the program are offered for download.
The "maximum" edition is the full version of Open Server. In addition to the local server, it includes a decent set of portable software for webmasters.


“Extended” edition is a version of the program without additional software. Recommended for those who do not intend to use additional software offered in the “Maximum” version in their work and want to save disk space.
The “basic” edition is the smallest version of the local server. In addition to the lack of software presented in the “maximum” version, the ImageMagick, PhpPgAdmin, PostgreSQL, Rockmongo, MongoDB and Git modules available in the “advanced” edition are also missing.
This version is recommended for users with slow Internet and those who want to save disk space as much as possible.
Which version should I download? If you are asking this question, then download “Basic”. Other versions are intended for advanced web developers.

Installing Open Server - "basic" edition.

If the situation is correct, on the page that opens we see the following:

Configuring local server settings, installing WordPress

Let's go through the settings. Open the menu, go to the “Settings” item, select the “Basic” tab:

In addition to the items marked by default, I noted two more. Run alongside Windows so as not to create an extra shortcut on the desktop.

And the requirement to run the program with administrator rights. Recommendation directly from the developer of the portable local server.

In the “Menu” tab I did the following:

I checked the “Show sites in the main menu” checkbox so that the domains I added would be displayed in the Open Server menu.

And I chose a browser, specifying the path to the executable file to open web pages.

I left the rest of the local server settings at default.

Let's start installing WordPress on a local server.

Go to the Open Server settings, select the “Domains” tab, enter the name of your domain (I registered the site for myself), click on the ellipsis:

In the new window that opens, create a folder of the same name for the domain:

Click OK, save, and restart the server. If everything is done correctly, our folder will appear in the Open Server menu:

The folder has been created, all that remains is to drop the unpacked WordPress distribution files into it (download the latest WordPress distribution from here).

We do this by simply copying files and directories from folder to folder, or using Total Commander.

From the unpacked archive we copy only what is inside the wordpress folder into the folder we created.

Our folder is located in the domains directory:

Almost everything is ready, but in order for everything to work, all that remains is to create a database for WordPress.

In the Open Server menu, on the “Advanced” tab, click on “PhpMyAdmin”.

In the window that opens, select the Russian language.

We enter the user - mysql.

Enter the password - mysql.

In the next window that opens, select the “Users” tab and click on the “Add user” link:

Select the host - localhost.

Coming up with a password

(We save the username and password in a secluded place, they will be useful to us later.)

Check the checkbox as shown in the picture.

Click OK in the lower right corner of the open window.

Close PhpMyAdmin - the database has been created.

All that remains is to rename the wp-config-sample.php file and make some changes to it.

We find this file in the following path: openserver/domains/your folder (in my case, the site)

Rename the file wp-config-sample.php to wp-config.php Open the file for editing (with Notepad++ editor), and enter the name of the database we created, username and password in the fields indicated in the screenshot:

Save the changes and close the edited file. We go to the Open Server menu, find our folder, click on it, and see the following:

Why won't Open Server start?

One of the reasons that the local Open Server does not start may be the running Skype program.

In order for the local server to work, exit Skype and launch Open Server, and after that Skype.

Problems with the local server may be due to the antivirus installed on the computer. If the server starts when the antivirus is disabled, then you need to deal with your antivirus program. Add Open Server files to the exceptions of the antivirus installed on your computer, and everything will work.

My AVG and COMODO firewall on the Open Server did not swear by default.

In contact with

How to create a local server on a computer? This question primarily concerns those who decided to create their own website and decided to install a local server in order to test it. But what is still needed for installation and why is it needed in general?

A local server is a program that allows you to develop a website directly on your computer. It differs from hosting in that a site on a local server is accessible only where it is directly installed.

This work is carried out with the aim of checking the functionality of the future site, so that in the future there will be no unexpected problems with the hosting.

There are several programs that allow you to install a local server. However, for the most part, the installation process is the same for everyone. Therefore, as an example, let’s consider “Denver” - a local server that is very popular in Russia, due to the fact that its creator is Russian and because it is very easy to use.

Such servers contain all the necessary files for work - Apache, PHP, MySQL, Perl, etc.., which means you only need to download the package itself.

Then proceed with the installation, after which everything should work correctly, which, for example, cannot be said about servers on the network where something is constantly not working. Therefore, this is certainly the main convenience of a local server.

How to create a local server on a computer in Denwer

In order to create a local server, first of all, you need to download a set of necessary files. To do this, you need to go to the Denver website (//www.denwer.ru/). It looks like this:

Then click on the “DOWNLOAD” button. We will be asked to choose one of two versions of PHP, choose the newest one. Then, a new window will open where you will need to provide your contact information - first name, last name and email. Next, you will receive a link to download Denver by email.

We wait a few minutes and download the program files to our computer using the link we received at the previously specified email address.

Step 2. How to install a local server

After the download is complete, run the installer. Click yes and the unpacking will begin. Then we just follow the instructions.

However, you may or may not encounter an "Access Denied" error when you press the Enter key. But, despite this, we still press Enter and continue the installation.

You can use a non-system drive C as the installation location, so that if another version of the operating system is installed, all data will be preserved.

During the installation process, the installer will ask you to select the letter Z as the installation location. If it is not busy, then you can select it; otherwise, select another letter, for example, D. Next, three shortcuts are created on the desktop.

The browser in a new window writes that “Denver” is installed, and also provides a list of possible errors that may occur when starting and working with the local server.

For example, this is blocked by the NOD32 virus in Windows XP. Another problem is the most common and is associated with a conflict in Skype. By default, both programs use port 80, so if the program does not work, you need to disable the use of the port in Skype. To do this, go to tools > connection problems > uncheck the use of port 80 and 443 > then save and the problem should be solved.

In order to make sure that everything works, you need to enter the localhost address bar. But some browsers use this string as a search. Therefore, for the first time it is better to enter the full address - //localhost. If everything worked, you should see a page like this:

At this point, the installation of the local server is complete, all that remains is to create a website on it and bring it to perfection, and then transfer it to hosting.

Having learned how to create a local network server, a completely logical question may arise: “What next?” To answer this you need to understand why, in general, a person needs a local server. If he just wants to practice creating websites and improve his skill level, then he should start studying hypertext markup languages ​​and style sheets.

If he needed to create a local server in order to test the existing site before directly uploading it to the network, then he should first install it on the local server. Ask: “How to do this?” More on this below.

Landing a site on a local server

A local server on your computer performs the same functions as a website on the network. The only difference between them is availability. After all, a local server installed on your computer will be accessible only to you, while the hosting site will be visible to everyone. Therefore, in order to avoid negative criticism from angry site users, all errors should be eliminated locally.

A website is a collection of web pages that are written in HTML, CSS and Javascript. These development tools can be used without the help of a local server and therefore site development begins with them. PHP, in turn, can be used on a server (any server); it is necessary for the site to be dynamic.

That is, if it were necessary to change information on all pages of the site, then there would be no need to go into each file and change something.

It would be enough to do it in one. However, at the beginning of development, the site is static, but this does not matter, because there you need to create only those pages that will differ from each other. Usually this is the main page, subsection and article page. Subsequently, you can add a feedback form, registration page and forum.

However, it will be much more convenient to create a website directly on a local server in order to use all the functions to the maximum from the very beginning. To do this, go to My Computer and see the disk that “Denver” created.

We go into the disk, go to the home folder and create a new folder and write the site address as the name. Next, you need to create a www folder inside. And directly in it we create a text file with the html extension (for example, index.html). To check whether it is displayed correctly, right-click on it and select open using notepad (or any other editor - Sublime text, Notepad, etc.). Inside the file we will write the standard “Hello world!” program. It looks like this:

Then we save and restart Denver by clicking on the Restart Denwer shortcut so that all the changes made take effect. However, if we now try to go to our website, which has the same name as the folder created in the Denver drive, we will not see anything. Because the local server conflicts with the hosts file. It is located here C:\WINDOWS\system32\drivers\etc\hosts.

The hosts file allows you to identify specific website addresses with a specific IP address. For example, our local machine is 127.0.0.1 www.localhost. When we type any site in the browser line, the first thing we do is check this site and go to the address on the left. If the transition to our local site does not work, this means that its address is not registered in the hosts file. This is often caused by an antivirus that blocks access.

To solve this problem, you need to go to the antivirus and select the settings section. There you need to find the “threats and exceptions” category > click the “setup” button and select our folder that we created in “Denver”. Next, save all the changes made and click ok.

Of course, this problem may not arise for everyone. Usually it occurs due to the characteristics of a particular antivirus. Now, after going to the local site, the following message should appear on the screen: “Hello world!”

If we want our site to work at localhost, then we just need to go to the localhost folder on Denver, go to www and also create an html file.

Denver users often have problems sending emails. The fact is that Denver doesn’t actually send letters, it only generates them and stores them in the folder:

tmp > !sendmail. In that folder there will be letters in the form of regular text files. So, if they are sent on a local server, then there will be no problems on the real one.

Thus, we can say that a local server is an excellent platform for website development, which is suitable for both beginners and professionals. Because installation does not require any special knowledge and skills, it is enough just to be familiar with a computer and be able to use application programs.

Plus, it should be noted that the local server cannot be seen from the Internet. The only thing you can do is open access to your home network, provided that all computers are in your home and use a common network connection. But usually such questions do not concern ordinary users.

Much more important points for them are directly related to the possible costs of maintaining the site. For example, payment for hosting and domain. However, there is clearly no need to worry about this, because purchasing a domain costs about a thousand a year, and you can find hosting for the same amount. Is this really such a big expense that you can’t go to make the site accessible to the masses and everyone can see what has been created for more than one month, or even a year?

If such arguments still do not convince a person, then at first you can use free hosting, but it limits the user’s actions. For example, you cannot sell advertising from the site in any form, but as you know, this is the main source of income for a web resource. So, when the site administrator sees that the visitors are still there, demanding bread and circuses, and he receives absolutely nothing for his work, then the transition to paid hosting will happen at once.

Perhaps, after reading this article, every user has learned something new for himself, and now if he is asked: “How to create a local server?”, he will confidently tell everything that he found out here. In order not to miss my next, no less interesting article, I strongly recommend subscribe to rss feed my blog.

Well, how do you like the article? Did you like it? Maybe you want to add to it or ask me to write something worthwhile next time? Feel free to write about it in your comments.

On this note, I conclude this article, and I would like to take this opportunity to congratulate everyone on the upcoming New Year 2017! May the coming year be better than the last! Health and good luck!

General information about the local server and the principle of its operation. Creating a local server based on the Denver assembly: preparation, installation and first launch.

Any programming is integral to the testing process - this is an axiom. Speaking about the development of web applications, the question inevitably arises of the presence of a certain “environment” that allows one to emulate the operation of an Internet server. In other words, we need local server.

Local server(English) local server) - a program or set of programs that perform service (maintenance) functions at the request of a client on a home (local) computer.

This “gentleman’s set” consists of Apache, PHP and MySQL - this is usually enough. On the other hand, this may include other components, depending on your needs. What is important for us here is the fact that we can use a ready-made assembly - Denver. Thus, we don’t have to understand the specifics of installing and configuring a local server - everything is done before us.

The only thing I want to draw your attention to in the operation of a local server is the need to reserve certain IP addresses for servers that will be available only on our computer. In the case of Windows, the file is responsible for reserving IP addresses hosts. Depending on the Windows version, the file hosts may be:

  • Windows 95/98/ME: WINDOWS\hosts
  • Windows NT/2000: WINNT\system32\drivers\etc\hosts
  • Windows XP/2003/Vista/7: WINDOWS\system32\drivers\etc\hosts

If you decide to use a local server based on the Denver distribution, you do not need to edit this file, everything will happen automatically, but it is useful to have a general understanding of the essence of the issue.

Preparing the local server for operation

From words to deeds. We assume that you have already downloaded the latest version of the Denver build and are ready to storm the citadel. Kidding. The main thing is not to rush and first of all check what is installed on your computer network protocols or not. How to do it? The easiest way:

Installing a local server

Now that we have made sure that our computer is ready to work with the network, we can begin installing the Denver distribution. Close all browser windows(es). Having launched the downloaded Denver installer, you will see a window in front of you:

Denver distribution installer window

Confirm your intentions by clicking the “Yes” button. The unpacking process will begin. After which a browser window will open with the message:

Message in browser window

Close the browser window and continue the installation in the installer window.

Following the instructions, we install the Denver distribution.

Note: You can interrupt the installation process at any time using a key combination Ctrl+Break. On most modern laptops, a key combination is used for this Ctrl+Fn+Pause.

  1. The directory where the distribution will be installed. I advise you to leave the default option, i.e. C:\WebServer - so press Enter.
  2. The name of the virtual disk that will be associated with the directory you just specified. I advise you to leave the default option, i.e. Z: . The main thing is that there is still a disc with that name did not have in the system - most often this happens with the Z: drive. So press Enter again.
  3. Starting and stopping Denver. We will be offered two options:
    1. Create a virtual disk when the machine boots (of course, the installer will make sure that this happens automatically), and do not disconnect it (the disk) when the servers are stopped.
    2. Create a virtual disk only by explicit command to start the complex (by clicking on the launch shortcut on the Desktop). And, accordingly, disconnect the disk from the system when the servers are stopped.

    I advise you to use the second option, because... running programs will constantly “hang” in the computer’s memory, which has a detrimental effect on its performance and can cause conflicts when working with other programs.

    Note: Some versions of Windows 98 may have a bug that prevents the virtual disk from disconnecting, at least the first time. This is not a distribution error, but an error in subst and there is nothing to be done about it.

That's all, the installation is finished.

First launch of local server

Finally, the installation is complete. Three icons should appear on the desktop: Start Denwer(start Denver), (stop Denver).

Denver management icons

Click the icon Start Denwer and wait until all the console windows that pop up during loading disappear. We open the browser and type in the address: http://localhost/, or rather http://localhost/denwer/ - but this is not essential. It is not necessary to leave the Internet. The main thing is that the following page should appear in front of us:

Test page when accessing localhost

If the test page does not load, check:

  • Is your proxy server disabled in your browser settings?
  • Is Denver running? If so, are there any errors when clicking on the pen icon (see bottom right corner)?
  • Are you running some other web server that could conflict with Denver? If yes, disable it.

Other options are possible, but this is no longer within the scope of this note.







2024 gtavrl.ru.