Denwer access only certain addresses. Denwer - your local web server: installing and configuring Denwer. How to work with Denver - go to the CMS installation

This is another article from the Webmaster Tools section, in which I want to talk under the name Denwer, which can be freely downloaded from the developer's resource. First, I'll tell you about what a local server is and why we need to work with it. Simply put, you can install and configure it on your computer by getting free analogue hosting (read about hosting and domains).

For you, in this case, you do not have to buy hosting and do not even need to have access to the Internet. The capabilities that Denver provides you are practically no different from the capabilities of a remote host, and it will consist of the same components and have the same capabilities. It already contains (read more about this script), the Apache server (read), has PHP support and much more.

Where to download Denwer, how to install and run it?

You can download separately all the components of the local server described above and, having installed them on your computer, configure correctly, but not everyone is able to do this. And even those who understand what's what, can experience a lot of difficulties during installation and especially when configuring it.

Therefore, to simplify our life with you, various installation packages (assemblies) were invented and created, allowing you to download a fully working and configured complex with minimal effort.

You just need to download a suitable assembly and install the engine of your project (Joomla, WordPress, etc.) on it, and then start working on it, in the same way as you would do when you find the engine files on a physical host. By the way, as an option and alternative this decision, can be considered, i.e. able to work with Joomla and WordPress. But in this article we will speak specifically for localhost.

So what do the developers of such free installation packages offer us? Let me list the links to the resource pages where you can download them, and then I will tell you in detail about the installation and configuration of one of them, which I chose as my favorite.

This is my personal choice, and you can use the package that you like best. Fortunately, the work with them is quite the same type and, having understood how to work with one assembly (today we will talk exclusively about Denwer), you can easily deal with any other.

Where you can download local server builds for free:

  1. Denver - download free
  2. VertrigoServ -

After following the link, you will have to register in the proposed form, after which you will receive a letter with a link to download the Denwer distribution kit.

Run the downloaded file with the exe extension, agree to install the package, after which it starts unpacking, and then a browser window will open with a description of the installation, which you can immediately close, and a black DOS window with the installation wizard appears:

Following the instructions of the wizard to continue the installation, press "Enter". In the next window, we need to specify in which folder on our computer we will install the server. You can choose, for example, C: \\ server.

Press "Enter", when asked if you really want to install Denver in this particular directory, you answer by setting "y" (game) and again press "Enter". Further, we are informed that a separate virtual disk will now be created, which is necessary for the functioning of all components of the local server.

Just press "Enter", and in the next window select the letter for virtual disk... This letter, of course, should not be used by your system at the moment (ie, the drive, the Latin letter "c", you definitely do not need to choose).

It is better to choose something from the last letters of the Latin alphabet, for example, Z. If it turns out that this letter is already used to designate a disk in your operating system Windows, then you will see a message about the impossibility of creating such a disk.

In this case, you will need to press "Enter" and repeat the step with entering the name of the installation directory, press "Enter" again and enter a different letter. Which drive letters are already taken on your computer, you can see in "My Computer".

If the letter you selected is not occupied, you will see a message about the successful creation of the virtual disk.

Press "Enter", as a result of which the files of this assembly will start copying to the computer folder you specified earlier. Next, you will be asked to choose a boot option, to which you answer by entering a unit and pressing "Enter". You will also be asked whether to create shortcuts to start, stop or restart on the desktop, to which you answer "y".

With these shortcuts you can start or stop the server. The installation wizard will then close, and a browser window will open with a page describing the next steps for working with the Denwer assembly.

Checking the health of the local server

Next, you go to your desktop and start Denver by clicking on the "Start" shortcut. At the same time, a DOS window will open for a short time, indicating that the server is starting, and then icons in the form of a feather and a black hat will appear in the tray (the area on the right side of the Windows taskbar, next to the clock), indicating that it is running.

Now type in address bar your browser localhost, as a result of which you will be taken to a page with the words "Hurray, it worked". This means that the assembly has been successfully installed on your Windows computer. Scrolling down this page, you will see links to test its functionality:

You follow this link, then in the window that opens, enter some text in the "Text" field (better in Russian - check that everything will be in order with the encoding) and click on the "Send via mail" button. If everything worked correctly, then you will receive a message like: OK, the mail () function worked correctly. But you also need to check that the letter really arrived.

To do this, you need to go to our virtual disk (remember the letter that you indicated when installing this assembly) and go along the following path:

Z: \\ tmp \\! Sendmail \\

By the way, you can go not to the virtual disk, but to the real one, where you have a local server installed (in my case, this is drive C) along the same path:

C: \\ tmp \\! Sendmail \\

If you are all right with sending mail, then in this folder you should find the letter you sent. Having opened it, you can check the correctness of the encoding of the Russian language.

Setting up and installing Joomla or WordPress in Denver

First, you will need to go to the folder where you installed the assembly (I have it c: \\ server \\) and go along the following path:

C: \\ server \\ home \\ localhost \\ www \\

In this WWW directory, you must create a directory into which you will later need to load the engine files (Joomla, WordPress, etc.). You come up with the name of the folder yourself, for example:

After creating the folder, restart the local host using the "Restart Denwer" shortcut on the desktop (if it has not already been started, then start it). To check if it works, enter in the address bar of your browser:

Http: // localhost / Proba /

If a page with the title "http: // localhost / Proba /" opens, then everything is in order. If no window opens, then try restarting Denwer again.

Now you need to install the engine (Joomla, WordPress, etc.) in exactly the same way as you did for real hosting (Joomla installation is described (in details and pictures). I wrote how to install the SMF forum, but it is covered in some detail from the link provided.

Those. you need to copy the engine files to a folder created on your computer (it acts as a local hosting). In my case, this is the folder:

C: \\ server \\ home \\ localhost \\ www \\ Proba \\

This process will differ from installing the engine on a real host () only in that for copying files no need to use FTP manager - the usual guide, well, or, like the Total Commander described under the link, will do just fine.

After you copy the Joomla or Wordpress files to the Denver folder, you need to type in the address bar of your browser to install the site or blog:

Http: // localhost / Proba /

As a result, a window of the installation wizard for a particular engine will open. Then you follow the same scenario as in a normal installation on a real hosting, with the only exception that you, as described in the article about installing Joomla (see the link above), and in the manner described below.

Creation of database and user by means of Denwer

In order to get into the phpMyAdmin program, included in the local server build kit, you need to type the following URL in the address bar of your browser:

Http: // localhost / tools /

In the window that opens, click on the link called "phpmyadmin", which will open the main page of this program. On it, in the "Create a new database" area, you enter the desired database name (for simplicity, it can be named the same as the directory for the site in the localhost folder, ie "Proba", in my case) and click the "Create ".

Now back to home page phpMyAdmin by clicking on the house icon in the left column of the program window. Find the Privileges link in the MySQL area and click on it.

On the phpMyAdmin page that opens, in the center, you should find the item "Add new user" and click on it.

In the "Username" area, enter the desired name (for simplicity, I use "Proba" again), in the "Host" area, enter localhost, in the "Password" and "Confirmation" areas, enter a very complex password twice.

In the "Global Privileges" area, click on the "Check All" label so that the created database user has maximum rights.

Everything, the database and the user in Denver are created. Now you can use this data when installing Joomla, WordPress, etc., which will go the same way as when installing on real hosting... Upon completion of this process, your resource will be available at:

Http: // localhost / Proba /

You can work with Joomla or WordPress in the usual way, but at the same time, work on editing engine files, installing and uninstalling is greatly simplified and accelerated various extensions, and also it becomes possible to work on your project even there, where there is no internet access.

Website transfer to hosting

After finishing the project, you should transfer site from Denwer to hosting in order for it to become available to visitors from the Internet. This is done in the same way as if you were just moving from one hosting to another or restoring your site from backup (I wrote about creating and restoring from a backup).

To do this, you will need to use the FileZilla program (which I wrote about) to move all files from the local server folder (in my case, this is the "Proba" folder) to the root directory of the remote host (usually either PUBLIC_HTML or HTDOCS).

And then open the configuration file of your engine for editing and change the parameters of the absolute path to files and folders of this engine, as well as the name of the database, user and password, to those that you set during creation new base data on hosting. All this is described in detail in the article on backing up and transferring a site, the link to which you will find going up a couple of paragraphs higher).

How to remove Denver from your computer

Quite often, the question arises of how to remove this assembly from your computer. The main hitch of removal is to disable the virtual disk created during installation. But first things first. First, of course, you will need to stop the local server using the appropriate shortcut on your desktop.

Then delete virtual diskthat was created during installation. Remember what letter you assigned to this virtual disk and go to Windows using the following path "Start" - "Run" (you can instead press the Win + R key combination), enter the command in the window that opens:

Subst z: / d

Instead of the virtual drive letter Z, you will need to enter your own (the Z drive suggests cz as the default virtual drive letter). Well, to permanently remove the Denwer assembly from your computer, it will be enough to delete the WebServers directory (by default it is the "C: \\ WebServers" folder) and remove three shortcuts from the desktop of your operating room windows systems... Everything, we can assume that we managed to remove it with a little blood.

Good luck to you! See you soon on the blog site pages

You might be interested


Is it possible to configure the system so that sites located on the local computer are available to all users local networkto which I am connected, or even from the Internet? ..

Denver projects by default not available from the local network. This is achieved by ensuring that all virtual hosts have an IP address of 127.0.0.1, which always stands for "the current local machine".

However, it is still possible to assign a virtual host an "external" IP address, accessible from your local network or even the Internet (if the computer has a permanent IP address on the Internet).

Remember: Denver is a developer tool, not a hosting tool. While projects in Denver can be made public, we strongly discourage doing so. The point here is security: Denver, as a rule, runs with Administrator rights, which means that scripts running under its control can do whatever they want on the machine. The slightest "hole" in the security of the script will give a hacker access to your machine.

Finding your IP address

First, you need to find out which IP address is assigned to you on the local network or the Internet. The easiest way to do this is by opening Command line Windows and typing there:

ipconfig

You will see something like the following:

Configuring IP for Windows
WiFi - Ethernet adapter:
DNS suffix for this connection. ... :
IP address. ... ... ... ... ... ... ... ... ... ... ... : 192.168.0.49
Subnet mask. ... ... ... ... ... ... ... ... ... : 255.255.255.0
Main gate. ... ... ... ... ... ... ... ... ... : 192.168.0.1

In this case, the external IP address of the machine on the local network is 192.168.0.49. The list may contain several network interfaces at once (if your computer is equipped with several network cards or wireless devices). In this case, you need to determine which of the interfaces is external, accessible from the local network. (IP addresses starting with 192.168 or 10 are only reserved for access from the local network, not from the Internet. That is, they are "private".)

Make sure your IP address is static i.e. does not change the next time the machine is turned on or rebooted. If the IP address is given dynamically, then it does not exist easy wayallowing you to connect Denver to it.

Configuring a firewall (firewall, firewall) Windows

On most Windows systems, built-in (or manually installed by you) firewall or antivirus blocks connections from external machines to the current one. This is for security reasons. Of course, if you open the site to the outside, this blocking should be disabled, otherwise no one will see the site.

Our goal is to resolve Windows connections to port 80 (HTTP protocol) of your IP address 192.168.0.49, on which Apache will "hang". Here are instructions on how to do this in Windows XP:


  1. Discover Start - Control Panel, select Windows firewall.

  2. Go to the tab Exceptions.

  3. Click the button Add port, in field Name enter your IP address and in the field Port number specify 80.

If you've installed your own firewall or antivirus software, then of course you'll have to consult their documentation.

An easy way to open the site out

Let's say your IP address is 192.168.0.49 like in the example above. The easiest way to get Denver to open a specific site at http://192.168.0.49 is to put the site's documents in the directory:

/home/192.168.0.49/www

Yes, the directory name contains periods! Don't forget to restart Denver as well.

Moreover: if your provider gave you not only the IP address, but also the associated one domain name, then the site will be immediately available for this domain name. When static IP the domain is given out almost always, you just need to find out it from the provider. For example, if your domain name is equal to abcd.ints.ru (provider Korvet-Telecom NEKST), then the site will be available at http://abcd.ints.ru.

Another way to assign an IP address to a site

If you already have a virtual host in Denver and you don't want to rename its document directory, you can assign your own IP address to the site and make it accessible from the outside. Let's assume your host is stored in the / home / mysupersite / www directory. To assign it an IP address 192.168.0.49, you need to create a file /home/mysupersite/.htaccess and add the lines to it:


## File /home/mysupersite/.htaccess
## Please enter your external IP here, not 192.168.0.49!
# dnwr_ip 192.168.0.49

By the way, you can find out what other directives there are by looking in the /home/custom/.htaccess file.


Restart Denver. Check that at http://192.168.0.49 (instead of 192.168.0.49, of course, you need to substitute your own IP address) your site / home / mysupersite / www opens.

Security alert

Recall again that Denver is not a complete and reliable Web server, it is just tool, allowing you to debug (test) sites without leaving home. Any attempt to use it for other purposes may be unsafe.

In general, you can customize anything you want, it's another matter - need is it. Remember that a Web server open to the outside world presents a potential security vulnerability for your machine. For example, an attacker can penetrate an incompletely debugged script. Because Denver is launched with Administrator rights (that is, with maximum rights in the system), then any script, even the smallest, can do whatever it wants. Let's assume that you've written a seemingly harmless test.pl script that does the following:

#! / usr / bin / perl -w
use CGI :: WebIn;
use CGI :: WebOut;
Header ("Content-type: text / plain");
open (F, $ IN) or die "Could not open \\ n";
while ( ) (print)

The program seemingly just prints the contents of the file specified in the fname parameter. For example, http: //localhost/cgi/test.pl? Fname \u003d test.pl will print source programs. However, as you can see, calling open like this is unsafe. For example, by going to the address /cgi/test.pl?fname\u003d|dеl+/s/q+c:\\windows, the program will execute:

Open (F, "| dеl / s / q c: \\\\ windows") or ...

This will immediately destroy the entire Windows directory!

You might say that localhost is localhost so that it only works from the current machine. If you opened access to the outside according to the instructions above, then everything is exactly like that. However, in the case of incorrect Apache configuration, it is possible to penetrate to localhost from outside (if the server is open). This is done very simply:

C: /\u003e telnet server.ru 80
GET /cgi/test.pl?fname\u003d|dеl+/s/q+c:\\windows HTTP / 1.1
Host: localhost
here you just need to press Enter

Conclusion: unless you have significant experience in server administration, installing an externally accessible Web server can be dangerous. This especially applies to the happy owners of dedicated Internet channels. One wrong move, and one morning you wake up with a freshly formatted hard drive (at best).

Local denwer server is extremely popular, so users have a lot of questions about installing and configuring it. This article, among other things, discusses and possible problems when working with denver.

Any modern site goes through a rather lengthy stage of development, including both the creation and finishing of the template, and filling it with content.

This entire process, of course, should be hidden from future site visitors, so this work is carried out not on a remote, but on a local server, which is the developer's own computer with special software installed on it. Most often, such software is Denwer.

Strictly speaking, a local server is necessary for the development of serious projects - dynamic sites for which you need to use php or Perl scripts.

Simple one-page sites that only work in HTML and CSS can be successfully created and tested right in the browser.

Why is Denwer used more often?

As we have already found out, the local server is a specialized software, having installed which on his computer, the webmaster can develop his site without going online.

There are quite a few similar platforms for developing sites today, among them the local Denwer server is popular. Therefore, users often have questions about how to start Denver.

This package of tools for web developers is versatile and customizable. It includes Apache HTTP Server, pHP preprocessor , the PHPMyAdmin database management component, the Perl interpreter, and many more important and useful components.

The undoubted advantages of Denwer include the extreme ease and speed of installation of the package, as well as the fact that all Denwer files after installation are located in a single Webservers folder.

On the question of how to update Denver, it should be said that the installer does not go into the operating system registry, so you can transfer all your local projects along with databases to another computer or disk by simply copying the local server folder.

Denver is just as easy to remove - no traces remain in the system after deleting its folder, after which you can download the updated installation package from the official website and re-install.

The main disadvantage of Denver is the ability to install exclusively on the Windows operating system.

So, once again, briefly note key features local Denwer server:

  • the basic version of Denwer is easily extended with new distributions and modules;
  • databases are managed using the fully functional PHPMyAdmin panel;
  • there is a possibility of simultaneous work with any number of sites;
  • it is possible to install old versions of PHP4, MySQL4, which can be useful for developers if the site does not work with the current version of localhost denwer;
  • the functionality of a site on a local server is completely similar to the functionality on a remote server of any hosting provider. This allows you to fully test the site before uploading it to a remote server.

Step by step instructions for installing denver

For those who do not know how to use Denver, we note that the latter has the advantage of being extremely easy to install.

In order to install this developer tool, you must perform the following steps:

Don't know how to get your website up and running in Denver? Just create a project in the C: WebServershomelocalhostwww folder.

The next step is to set up a local server

One of the advantages of Denver is its ease of setup. How to set up Denver correctly, we will explain below. If you use the default settings, problems may arise when installing large extensions or when importing a large database.

The default settings limit the size of uploaded files to just two megabytes. To remove this restriction, you must edit in the usual text editor php.ini file (located in the usrlocalphp5 folder).

In the line upload_max_filesize \u003d 2M, change parameter 2 to 32, thereby limiting the size of the uploaded file to 32 megabytes.

At the same time, in the line post_max_size \u003d 8M, the eight should be replaced with the number 64, since this parameter determines the maximum amount of transmitted data, and it must be two or even three times more than the limit on the size of the uploaded file.

If all users followed these recommendations, there would be less talk about Denver not working.

Getting started with a local server

In order to start working with a local server, you need to start Denver by double-clicking on the Start Denwer icon on your desktop, open a browser and type the address http: // localhost / denwer / in the address bar.

If a window opens, the same as in the picture below, then your local server has started successfully. If error messages appear, then this means that Denver does not start:

On the previously opened page http: // localhost / denwer / find the section “ Denver Testing"And in the table of this section, follow all the links available, each of which activates one of the installed modules.

If there are no problems, the capabilities of the future site on your local server will fully correspond to what you get on the remote server of the hosting provider:

First of all, check that PHP is working and go to the database administration service - PHPMyAdmin.

If you don't know how to enter phpmyadmin denwer, just click on the corresponding link in the same table:

To start developing new project on your local server, you just need to create new folder, for example, Moy_Sayt.ru in the C: WebServershomelocalhostwww directory. Its name will match the name of your site.

In the future, in order to open a local site, in the browser it will be necessary to register the name of this folder after http: // localhost /, for example, http: //localhost/Moy_Sayt.ru/.

What if Denver doesn't work?

After connecting the local server, the browser in some cases displays a message that Denver does not start. The main reason is most often because your antivirus suite or firewall is blocking it.

In this case, you will have to independently allow the outgoing connection for the server via the TCP protocol on ports 80 and 443 for http and https, respectively. (It is usually located at C: webserversUSRlocalapacheBINhttpd.exe).

By the way, the same ports can be occupied by the popular skype app , so it is better to disable it while working with the local server.

Projects similar to Denwer

Although Denver is one of the most popular, flexible and simple tools for web developers, it is sometimes useful to familiarize yourself with similar solutions, which also provide the user with a full-fledged local server for website development.

For example, the denwer analogue XAMPP offers not only a set of tools for a local server, but also a full-fledged graphical shell, which, as previously noted, is not available in Denwer. Therefore, many developers prefer XAMPP.

Denver-based projects are not accessible from the local network by default. This is achieved by ensuring that all virtual hosts have an IP address of 127.0.0.1, which always stands for "the current local machine".

However, it is still possible to assign a virtual host an "external" IP address, accessible from your local network or even the Internet (if the computer has a permanent IP address on the Internet).
Remember: Denver is a developer tool, not a hosting tool. While projects in Denver can be made public, we strongly discourage doing so. The point here is security: Denver, as a rule, runs with Administrator rights, which means that scripts running under its control can do whatever they want on the machine. The slightest "hole" in the security of the script will give a hacker access to your machine.

The Denver authors are not responsible for any damage caused by hackers to those who opened Denver outside and inadvertently allowed a security vulnerability in their scripts.
Finding your IP address

First, you need to find out which IP address is assigned to you on the local network or the Internet. The easiest way to do this is by opening the Command windows string and typing there:
ipconfig

You will see something like the following:
Configuring IP for Windows
WiFi - Ethernet adapter:
DNS suffix for this connection. ... :
IP address. ... ... ... ... ... ... ... ... ... ... ... : 192.168.0.49
Subnet mask. ... ... ... ... ... ... ... ... ... : 255.255.255.0
Main gate. ... ... ... ... ... ... ... ... ... : 192.168.0.1

In this case, the external IP address of the machine on the local network is 192.168.0.49. The list may contain several network interfaces at once (if your computer is equipped with several network cards or wireless devices). In this case, you need to determine which of the interfaces is external, accessible from the local network. (IP addresses starting with 192.168 or 10 are only reserved for access from the local network, not from the Internet. That is, they are "private".)
Make sure your IP address is static i.e. does not change the next time the machine is turned on or rebooted. If the IP address is issued dynamically, then there is no easy way to connect Denver to it.
Configuring a firewall (firewall, firewall) Windows

In most Windows systems, a built-in (or manually installed by you) firewall or antivirus blocks connections from external machines to the current one. This is for security reasons. Of course, if you open the site to the outside, this blocking should be disabled, otherwise no one will see the site.

Our goal is to allow Windows connections to port 80 (HTTP protocol) of your IP address 192.168.0.49, which will host Apache. Here are the instructions on how to do this in Windows XP:
Open Start - Control Panel, select Windows Firewall.
Go to the Exceptions tab.
Click the Add Port button, enter your IP address in the Name field, and enter 80 in the Port Number field.

If you've installed your own firewall or antivirus software, then of course you'll have to consult their documentation.
An easy way to open the site out

Let's say your IP address is 192.168.0.49 like in the example above. The easiest way to get Denver to open a specific site at a URL is to put the site's documents in the directory:
/home/192.168.0.49/www

Yes, the directory name contains periods! Don't forget to restart Denver as well.

Moreover, if your ISP gave you not only an IP address, but also a domain name associated with it, then the site will be immediately available under this domain name. In the case of a static IP-address, the domain is given out almost always, you just need to get it from the provider. For example, if your domain name is equal to abcd.ints.ru (provider Korvet-Telecom NEKST), then the site will be available at.
Another way to assign an IP address to a site

If you already have a virtual host in Denver and do not want to rename its document directory, then you can assign your own IP address to the site and make it accessible from the outside. Let's assume your host is stored in the / home / mysupersite / www directory. To assign it an IP address 192.168.0.49, you need to create a file /home/mysupersite/.htaccess and add the lines to it:
## File /home/mysupersite/.htaccess
## Please enter your external IP here, not 192.168.0.49!
# dnwr_ip 192.168.0.49
By the way, you can find out what other directives there are by looking in the /home/custom/.htaccess file.

Restart Denver. Check that the address (instead of 192.168.0.49, of course, you need to substitute your own IP address) opens your site / home / mysupersite / www.
Security alert

Recall again that Denver is not a complete and reliable Web server, it is just a tool that allows you to debug (test) sites without leaving your home. Any attempt to use it for other purposes may be unsafe.

In general, you can configure anything you want, it's another matter whether it is necessary. Remember that a Web server that is open to the outside world presents a potential security vulnerability for your machine. For example, an attacker can penetrate an incompletely debugged script. Because Denver is launched with Administrator rights (that is, with the maximum rights in the system), then any script, even the smallest, can do whatever it pleases. Let's assume that you've written a seemingly harmless test.pl script that does the following:
#! / usr / bin / perl -w
use CGI :: WebIn;
use CGI :: WebOut;
Header ("Content-type: text / plain");
open (F, $ IN) or die "Could not open \\ n";
while ( ) (print)

The program seemingly just prints the contents of the file specified in the fname parameter. For example, it will print the source code of the program. However, as you can see, calling open like this is unsafe. For example, by going to the address /cgi/test.pl?fname\u003d|dеl+/s/q+c:\\windows, the program will execute:
open (F, "| dеl / s / q c: \\\\ windows") or ...

This will immediately destroy the entire Windows directory!

You might say that localhost is localhost so that it only works from the current machine. If you opened access to the outside according to the instructions above, then everything is exactly like that. However, in case of incorrect Apache configuration, it is possible to penetrate localhost from outside (if the server is open). This is done very simply:
C: /\u003e telnet server.ru 80
GET /cgi/test.pl?fname\u003d|dеl+/s/q+c:\\windows HTTP / 1.1
Host: localhost
here you just need to press Enter

Takeaway: Unless you have significant experience in server administration, installing an externally accessible Web server can be dangerous. This is especially true for the happy owners of dedicated Internet channels. One wrong move, and one morning you wake up with a freshly formatted hard drive (at best).

This is of course hard copy-paste, but even so let the person read it). Material taken from the site Denwer.ru

Denwer is a fairly popular tool among web developers, which allows you to deploy an environment on a computer for developing and debugging a site with the least amount of time. If you have used this tool, then you probably already noticed that it includes traditional software for web servers, including Apache, MySQL, PHP. In the overwhelming majority of cases, this is quite enough, in this article we will consider the possibility of using Denwer in a local network. Where might you need it? Well, for example, you work in an office, you need to open local network access for other computers for some time so that they, in turn, can open a website hosted on your computer.

Let's assume you have a directory where your site is hosted. Now you need to configure the Apache web server so that it can handle requests from the outside. Opening the configuration file:

C: /WebServers/usr/local/apache/conf/httpd.conf

We will take the default path, it is set when installing the Denwer package, if your server is located in a different path, change it for your case. Let's uncomment the line with the entry:

Listen 80

This tells the server to listen on port 80 on the computer.
Next, you need to register virtual hosts for your site, for this we open the file:

C: /WebServers/usr/local/apache/conf/vhosts.conf

We register our virtual host:

DocumentRoot Z: /home/localhost/www/host.example.com ServerName host.example.com

Where 192.168.0.132 is the IP address of your computer in the local network, DocumentRoot is the path to the directory of your site, ServerName is the domain that will be accessed from the local network. Remember to restart the web server after making changes to the configuration files.

Thus, to open the site from the side of client machines, they need to write in the file:

C: \\ Windows \\ System32 \\ drivers \\ etc \\ hosts

The record looks like this:
192.168.0.132 host.example.com
Save the file, and then try to open host.example.com in a browser.
Now for those who have gone wrong. It often happens that it is impossible to open a site from the outside, the first thing I recommend is to look at the firewall as well as the antivirus installed on the computer with Denwer, they can often block traffic from the local network. I also recommend checking the availability of port 80 of the server from the client machine; for this purpose, you can use the telnet utility. We open command line in the system, enter the request:

Telnet ip-computer-with-site 80

If everything is in order, you should connect to the server on port 80, otherwise you will receive an error message.