Opening access to the Denwer server from the local network. Denwer - Your Local Web Server: Installing and Configuring Denwer How to Connect to Trinity Server Through Denver

It is a software shell, which includes the appropriate distributions and modules that allow you to develop, test and debug sites directly on your local computer, without the need for Internet access.

Denver is traditionally considered one of the most relevant and effective tools for web developers. Powerful customization and debugging tools, the ability to comfortably develop and test sites on a local server create ideal conditions for working without risks for your site in the vastness of the network.

Working with Denver - features of the server itself

Before setting up Denver, you need to consider several nuances of the server itself. First of all, the key feature of Denver is support for working with several web projects at the same time, with the location of each of them separately on its own virtual host. For this, a separate folder is created by the server for each project. Such hosts are created automatically.

As practice shows, setting up Denwer is not particularly difficult, but it is still important to take into account a number of key parameters for efficient and stable operation. First of all, how to work with Denver, what do you need to consider for customization?

All components of this software solution are already provided fully configured, ready to go. Including SSL, MySQL encryption and other software tools. If desired, the user can independently manually update any of the services that are part of Denver. For this purpose, new versions of distributions are simply copied over the new ones in the folder.

After our installation is complete, the browser window will reappear informing about the completion of the installation. You can safely close it. To start the program, we find the Start Denwer shortcut on the desktop - double-clicking on it, we will start our server.

Of course, the program needs some time to run. And after loading the application, two icons will be visible on the panel - if they are available, the launch went fine. When we open "My Computer", we will see the virtual disk Z appear on the computer.

Moving on to it, we can notice several folders. In this case, we are interested in just the Home folder.

And here we will already notice the presence of several folders - Localhost and test1.ru, which will be root for two local sites. The first contains a set of utilities for working with the database, the second folder contains a test site with one web page.

Let's focus on working with the database. Here, to work with Denver, launch any browser by typing localhost or http: // localhost. After that, we will see a message about the server's operation.

Then, to configure Denver, scroll down to the Utilities heading to see a lot of links. We select the line "phpMyAdmin - administration of the MySQL DBMS", after which we will see a new window.

We enter the name of our database in the Create new database field in Latin letters, it remains only to click Create and a new window should appear.

There is no need to do anything here, just click the Privileges tab to move on.

When we click Add a new User, we will see a new window in which a number of information must be specified:

  1. User name - mark the username.
  2. Host - here we specify Localhost or you can select Local from the drop-down list.
  3. Password and Re-type - you need to specify a password here. Or it can be generated using Generate. However, it is imperative to remember, it is better to fix it somewhere, we will definitely need it in the future.

Below we will notice the Global privileges block. Here you need to select all the options using the Check All button. Then it just remains to click Go in the right corner, after which we are done. All that remains is to congratulate - by going through all the above steps, you have successfully coped with the creation of your new database. Next, let's move on to its direct use for the effective and stable operation of our site.

How to work with Denver - go to the CMS installation

We already have a fairly serious piece of work behind us, because we managed not only to install and configure the server, but even to create our own database. Now all that remains is to understand how to use the resulting resources to develop and test the desired site.

To do this, we have to install a specific CMS of our choice, which will be used to operate the site. But when installing the CMS, we will definitely need certain information, so we will immediately mark them somewhere on our piece of paper or in a file - including the database name, the database username itself and its password.

There are no special difficulties to install the CMS on a local server, you just need to perform the following procedure:

  • Creation of a key folder in which our site will be located.
  • The necessary folders and files are transferred to this new directory.
  • We reboot our Denver server.
  • And it just remains to install the CMS.

As an example, let's take a look at working with the now popular CMS WordPress engine. Other CMS, of course, can assume certain nuances, but the general principle is almost always absolutely universal.


Thus, we learned how to install, configure and work with Denwer.

The modern capabilities of Denver ideally recommended it for stable operation, with the correct development and testing of the site without the need to place it on the network.

In our article, we covered the main steps on how to install and work with Denwer. To start most projects, this information is enough - we have gone through the stages of installation, server launch, configuration, database creation and launch of a full-fledged website. That is, we examined the entire life cycle to start developing a site - the rest depends only on your patience and talents, we wish you successful development and testing of high-quality and popular Internet resources.

Good day, dear readers. This topic is chewed up and down and there is probably on everyone, somewhere there are inaccuracies and incompleteness of information, as well as not enough photos and step-by-step screenshots, having reviewed all the sites I made a complete overview, detailed installation and configuration guide useful tool for the webmaster - Denwer (reads "Denver" - a gentleman's set of a web developer).

Theory. What is Denver and how does it work?

Denver is a shell ( web server emulator on the systemunix ) which includes a set of distributions and modules ( Apache + SSL, PHP5, MySQL5, phpMyAdmin, etc.) to debug sites on ( local, https: // localhost) a computer or laptop without the need for Internet access.

OS (Operating Systems) Support: Windows XP / Vista / 7/8.

Denwer features

A key feature of Denver is support for working with several web projects at once, each of which is located on a separate virtual host (in the form of a separate folder). Virtual hosts for projects are created automatically: for example, you just need to copy the project files to /home/WebProjectName.ru/www, and it will immediately become available at https: //WebProjectName.ru, then we will consider this in more detail.

All Denver components are already configured and ready to work (in particular, the Russian-language encoding MySQL, SSL, etc. is configured correctly). Alternatively, you can manually update any of Denver's services (Apache, PHP, MySQL, etc.) by simply copying the new distributions over the old ones.

Denver basic package includes:

  1. Apache 2 with SSL and mod_rewrite support.
  2. PHP5: executables, module for Apache web server, distribution and customized configuration file, GD library, MySQL and sqLite support modules.
  3. MySQL5 with support for InnoDB, transactions and Russian encodings (windows-1251).
  4. phpMyAdmin - MySQL database control panel, as well as a script that makes it easy to add a new MySQL user.
  5. A debug emulator sendmail (/ usr / sbin / sendmail), which does not send emails, but writes them to the / tmp /! Sendmail directory.
  6. A system for automatically searching virtual hosts and updating the system hosts file, as well as Apache configuration. Thanks to it, adding a new virtual host (or third-level domain) consists in simply creating a directory in / home (see by analogy with existing hosts) and restarting the complex. All changes are made to configuration and system files automatically, but you can control this process using the host templating engine (see /usr/local/apache/conf/httpd.conf for details).

Add-ons ("expansion packs") are available on the Denver official website that expand the capabilities of the base kit:

  • PHP version 3 as a CGI program;
  • PHP version 4 as a CGI program;
  • additional modules for Apache;
  • additional modules for PHP;
  • full version of ActivePerl;
  • activePython interpreter.
  • mySQL server version 4;
  • parser technology support modules;
  • PostgreSQL DBMS;
  • FireBird DBMS versions 2 and 1.3
  • other popular modules.

I think that's enough theory, let's move on to practice ...

Installing Denwer

At the time of writing this tutorial, I am using the following version of Denver:
Version: Denver-3 from 2012-09-16

You can always download the latest version of Denver from the official website above.

How to install denver (denwer)? detailed instructions

So you downloaded the Denver installation file. Open the file, a small window will appear "Do you really want to install the base package?" push Yes.

Then a browser window will open, which you can close immediately, you will see the following picture ..

As you can see, the entire installation will take place in the command interpreter cmd, the first welcome window, to continue, press the button Enter.

The program will check for the presence of the necessary drivers and system components, and then ask us to indicate which directory to install Denver.

If you do not specify anything, then by default the program will be installed in the C: \\ WebServers directory, I indicated C: \\ Server like this, you can specify your name or leave it by default, and then click Enter... A question will appear ..

Click " y " yes

Next, we will check the necessary utilities to create a virtual disk, in windows such a utility is called subs.You will need to specify the name of the virtual disk, by default the system offers disk Z, my disk Z is busy, so I chose disk X. You can also specify any free disk or leave the default disk Z if it is not busy. Push Enter.

After copying is completed, you need to specify in which mode Denver will start, select the item, press [ Enter]

All! Denwer installation complete... A browser window will open about the end of the installation, read and close.

Shortcuts should appear on the desktop ..

LabelCommandAct
StartDenwer C: \\ [your_directory] / denwer \\ r un.exe)denver server launch
Restart denwer C: \\ [your_directory] / denwer \\ restart .exe)server restart Denver
Stop denwer C: \\ [your_directory] / denwer \\ stop .exe)Stopping the server
C: \\ [your _directory] / denwer \\ SwitchOff.exe

Launching and configuring Denwer

To start enjoy Denver, do the following:

  1. Start Denver using the shortcut Start denwer on the desktop.
    If you did not create shortcuts, then you can start Denver by the command C: \\ [your_directory] /denwer\\Run.exe, for this we press the key combination [ Win] + [R]and in the window that appears, enter the command.
  1. Open your browser and go to https: // localhost
  2. You should see denver home page... Below on this page there is a table with links, I immediately advise you to check the performance of all links.
  1. If after starting Denver https: // localhost does not open, check if Denver is blocked by your antivirus or firewall. For example, problems with NOD32 in Windows XP were noticed (in it, you need to add the X process: /usr/local/apache/bin/httpd.exe to the list of exclusions, this can be done in the IMON / Settings / Miscellaneous / Exception window).

Attention! If you are using Skype, make sure it doesn't occupy ports 80 and 443 required for Apache to run in Denver (" Tools - Options - Advanced - Connection - Use ports 80 and 443 as incoming alternatives» should be disabled).

Attention! Common mistake: if only localhost is running and other hosts are does not work, please check if your proxy server is disabled ( Tools - Internet Options - Connection - Network Settings).

Now you know how to use Denver as a testing and debugging site for your sites. I want to tell you some more useful information ..

Denwer directory structure

HTML documents should be in the / home / directories<имя_хоста>/ www. By default, there are 3 virtual hosts configured:

- https: // localhost (contains test scripts and various utilities);
- https://test1.ru;
- https: // custom-host: 8648 (a host with its own IP address and port);

Virtual hosts with domain names of the third and higher levels are also supported. Examples of how Apache searches the host document directories in this case:

Domain name Document directory

~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~

abcd.test1.ru /home/test1.ru/abcd

ab.cd.test1.ru /home/test1.ru/ab.cd

test.localhost / home / localhost / test

ab.cd.localhost /home/localhost/ab.cd

The / usr / local directory contains software components - executable and configuration files for Apache, PHP, MySQL. The authors have tried to keep this arrangement close to the UNIX environment. But there are serious differences - not all components of the package are distributed in the appropriate directories. In any case, it is impossible to achieve a complete analogy with UNIX OS, but this arrangement of executable and configuration files makes it somewhat easier to navigate the server components.

Utilities in the "Gentleman's Kit"

  • DNSearch: find files the search is carried out in files with the htm, html, shtml, xhtml extensions by directly viewing the contents of the documents.
  • List of registered sites - the utility generates a page with web projects (sites) created in the system.
  • Setting up new MySQL databases and users - a very convenient and simple utility for creating Databases (DB), unlike phpMyAdmin.
  • phpMyAdmin - administration of the MySQL DBMS

How to remove Denwer?

Denver autonomous: it can be located in any directory on the disk (or even on a flash drive). It also does not modify Windows system files, so Denwer can be uninstalled by simply deleting its folder.

What should be done to remove denver?

  1. Stopping Denwer Server(on the desktop, run the Stop Denwer shortcut or with a command in cmd:
    C: \\ [your_directory] / denwer \\ stop .exe)
  2. Stopping and unmounting a virtual disk (command in cmd: C: \\ [your _ directory] / denwer \\ SwitchOff.exe
  3. Remove the directory where Denwer is installed
  4. Remove desktop shortcuts

This concludes this lesson, I hope it was useful to you. If you have any questions, write in the comments or email me.

Best regards, Sergey Chirkov.


Is it possible to configure the system so that sites located on the local computer are available to all users of the local network to 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, is launched with Administrator rights, which means that scripts running under his control can do anything 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 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) 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 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 outward

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 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 http://abcd.ints.ru.

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 your site / home / mysupersite / www opens at http://192.168.0.49 (instead of 192.168.0.49, of course, you need to substitute your own IP address).

Security alert

To recap, Denver is not a complete and reliable Web server, it is just tool, allowing you to debug (test) sites without leaving your 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 to 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 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, http: //localhost/cgi/test.pl? Fname \u003d test.pl 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

Output: 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).

This article describes an easy way to open access to an installed Denwer server over a local network. It is important to remember that the technology is presented in a trial mode, and in no way encourages readers to use this package as a standalone web server. Remember! Opening access to the Denwer web server from the outside creates a number of serious vulnerabilities in the security of the operating system!
This information is designed primarily for beginners, therefore it is replete with a large number of screenshots and detailed descriptions of actions that may seem completely unnecessary to an ordinary user. Please be understanding.
And so, our task is to open access to the Denver web server from the local network. The primary task is to find out the IP address of the computer on the local network. The system is assumed to have pre-configured network settings with a static IP address. If you know the IP address, you can skip directly to step 7 of this article.
1. Click Start.
Picture 1.
2. Next, go to the command Execute.

Figure 2.
3. Next, run the command line. To do this, enter the following command in the line highlighted with a red marker:
The code: cmd
After that, press the button OKas shown in Figure 3.

Figure 3.
4. We see the window shown in Figure 4.

Figure 4.
5. Enter the command to view the available connections:
The code: ipconfig
Press the enter key.

Figure 5.
6. We see a list of available connections. In my case, the current adapter is the wireless network, as marked in red in Figure 6. You might have a local area connection adapter. We see the parameter value IPv4 address has the form 192.168.0.36 ... This is the current IP address of our computer on the local network.

Figure 6.
7. Now launch any file manager and go to the folder with the installed package Denver, as shown in Figure 7. You can have it in any other place, but the course of action does not change from this.

Figure 7.
8. Next, go to the directory:
The code: / denwer / home /
The current path is highlighted with a red marker.

Figure 8.
9. Here you need to create a new directory, the name of which will correspond to the IP address from paragraph 6 of this article, that is, the IP address of our computer in the local network.

Figure 9.
10. And so, the directory is created, as shown in Figure 10. Go to it.

Figure 10.
11. Here you need to create another directory named:
The code: www
Pay attention to the directory in which we create the folder. The full path is highlighted in purple in Figure 11.

Figure 11.
12. The system will access this folder when accessing the web server from the local network. This is where our hosting scripts will be stored.

Figure 12.
13. Now let's move on to testing the server. Launch Denver with the appropriate shortcut, as shown in Figure 13.

Figure 13.
14. We wait until the corresponding icon appears in the system tray informing about the successful launch of the package.

Figure 14.
15. Launch a web browser, and, in the address bar, enter the local IP address of our computer, as shown in Figure 15 in red.

Figure 15.
16. We see that access to the Denver server is open over the local network.

Figure 16.