Installation and configuration of the Denwer web server. What is Denver local server (Denwer) and how to install it on your computer

It doesn’t matter why you need to create your own website, the main thing is to approach this matter with full responsibility and act step by step. The first thing to do is install a local web server on your computer with which you can practice and start creating your own website even without Internet access.

In order to turn your local computer into a full-fledged (test) web server, you need to download and install a special software package. There are quite a lot of similar complexes, but they usually include a standard set of products - Apache web server, MySQL DBMS, PHP language And so on.

In this article we will look at one of the most popular software packages for web developers called Denwer. And exactly We will install Denwer on your local computer running operating system Windows 7. If you have a different version of the operating system, it's okay Denwer installs without problems on Windows XP and Windows 10.

Where to download Denwer

Before you start the installation, you need to download Denwer (Denver) from the official website of the developer, where you need to fill in your personal data, such as name and email address, after which a link to the distribution kit will be sent to you at the address you specified. Or you can go the other way and download exactly the same distribution from our website using .

Installation process

Now let’s begin installing Denver on Windows 7. Let me remind you that for other versions of Windows, be it XP or 10ka, the whole process will be similar.

We launch the newly downloaded Denver distribution and see a security warning that says whether we really want to allow the application to make changes to the computer. We say that we agree by clicking on the “Yes” button and move on to the next step.

In the installer window, when asked “Do you really want to install the base package?” Click “Yes” and wait until the archive is unpacked.

After unpacking the archive, a browser window and console will open in front of you. The browser, as a rule, does not contain any useful information for us; moreover, in most cases it tries to open a non-existent page on your computer, so you can safely close it. You shouldn’t touch the console; we’ll need it to install Denver.

After closing the browser window, although this is not necessary, go to the console and press the Enter key.

Next we read something like “blah blah blah”, and at the very end of the console the directory in which the server will be installed is indicated, by default it is C:\WebServers, but no one forbids specifying another drive, simply entering a new path, as in the screenshot below:

Next, we confirm the installation in the selected location, in my case the folder D:\WebSrv already exists and a warning appears asking whether I really want to install in it, we do not pay attention to all this and click on the “Y” button if we want to continue, or press the “N” button if you change your mind.

The next step is to again confirm that we want to install the web server in this directory by pressing the “Enter” key. Everything is standard in the style of small-soft (Microsoft).

The next step will create a virtual disk, which is necessary for the functioning of all system components. We choose any drive letter you like, by default it is the letter “Z”, we’ll probably leave it.

Press “Enter”, and then again and before moving on to the next step, wait until all the files are unpacked.

Now we have to choose how exactly to load a virtual disk, there are only two options:

  1. The disk is created and appears immediately when the system boots and is not disconnected when shutting down.
  2. The disk is created when the web server starts, and after the web server is stopped the disk disappears.

In principle, both options are good in their own way, choose what you like. I usually choose the first option, in this case, even when the server is turned off, you can work with files on the disk (of course, you can do this directly in the folder specified at the beginning of the installation, but it’s more convenient for me).

Press “Enter” and move on to the next step.

At the end of the installation, Denver will ask something like the following - “would you like to place shortcuts on the desktop?” I strongly recommend answering “I want”, in which case it will be more convenient to work with it in the future. Press the “Y” key and press “Enter”. After that, 3 shortcuts are created on the desktop to start, stop and restart the server.

At this point, the installation of the local Denwer web server is complete, and you can see 3 shortcuts on the desktop:

  • Restart Denwer - restart the server
  • Start Denwer - start the server
  • Stop Denwer - stop the server.

They look like this.

Good afternoon, dear readers. This topic has been chewed up and down and is probably on everyone, somewhere there are inaccuracies and incompleteness of information, and there are also not enough photos and step-by-step screenshots, after reviewing all the sites I made a complete review, detailed installation and configuration guide a useful tool for webmasters - Denwer(read “Denver” - a gentleman’s kit for a web developer).

Theory. What is Denver and how does it work?

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

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

Denwer Features

The key feature of Denver is its 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/NameWebProjecta.ru/www, and it will immediately become available at https://NameWebProjecta.ru, we will look at this in more detail later.

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

Denver Basic Package Contents:

  1. Apache 2 with SSL support and mod_rewrite.
  2. PHP5: executable files, module for the Apache web server, distribution and adapted 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. Debugging sendmail emulator (/usr/sbin/sendmail), which does not send messages, but writes them to the /tmp/!sendmail directory.
  6. A system for automatically searching for virtual hosts and updating the system hosts file, as well as the Apache configuration. Thanks to it, adding a new virtual host (or third-level domain) involves simply creating a directory in /home (see 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 template mechanism (see /usr/local/apache/conf/httpd.conf for detailed explanations).

Add-ons (“expansion packs”) are available on Denver’s official website to expand the capabilities of the basic 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...

Denver installation

At the time of writing this tutorial, I was 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 listed above.

How to install denwer? detailed instructions

So, you have downloaded the Denver installation file. We open the file, a small window will appear “Are you sure you want to install the base package?” press 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 cmd command interpreter, the first welcome window, click the button to continue Enter.

The program will check for the presence of the necessary drivers and system components, then ask us to indicate in 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 specified this as C:\Server. You can specify your name or leave it as default, then click the button Enter. A question will appear..

Click " y" yes

Next we will check the necessary utilities for creating a virtual disk; in Windows this utility is called subs. You will need to specify the name of the virtual disk, by default the system suggests 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. Click Enter.

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

All! Denwer installation is complete. A browser window will open indicating the installation is complete, read and close.

We should have shortcuts on the desktop...

LabelTeamAction
StartDenwerC:\[your_directory]/denwer\ r un.exe)Denver server launch
Restart DenwerC:\[your_directory]/denwer\ restart .exe)restarting the Denver server
Stop DenwerC:\[your_directory]/denwer\ stop .exe)Stopping the server
C:\[your_directory]/denwer\ SwitchOff.exe

Launching and setting up Denwer

To get started enjoy Denver, do the following:

  1. Launch Denver using the shortcut Start Denwer on the desktop.
    If you have not created shortcuts, you can run Denver using the command C:\[your_directory]/denwer\Run.exe , to do this press the key combination [ Win]+[R] and enter the command in the window that appears.
  1. Open your browser and go to https://localhost
  2. You must see Denver home page. A little lower on this page there is a table with links, I advise you to immediately check the functionality of all links.
  1. If after launching Denver https://localhost does not open, check if Denver is not blocked by your antivirus or firewall. For example, problems were noticed with NOD32 in Windows XP (you need to add the process X:/usr/local/apache/bin/httpd.exe to the list of exceptions, this can be done in the IMON/Settings/Miscellaneous/Exception window).

Attention! If you are using Skype, make sure it doesn't occupy any ports 80 And 443 , required for Apache to run in Denver (" Tools - Settings - 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 turned off ( 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 must be located in /home/ directories<имя_хоста>/www. By default, 3 virtual hosts are configured:

— https://localhost (contains testing 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 looks for 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 - Apache, PHP, MySQL executable and configuration files. The authors tried to keep this arrangement close to that accepted in the UNIX environment. But there are serious differences - not all components of the package are distributed in the appropriate directories. In any case, complete analogy with the UNIX OS cannot be achieved, but this placement of executable and configuration files makes it somewhat easier to navigate the server components.

Utilities included in the "Gentleman's Set"

  • DNSearch: file search the search is carried out in files with the extensions htm, html, shtml, xhtml 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.
  • Creating new databases and MySQL users – a very convenient and simple utility for creating Databases (DBs), unlike phpMyAdmin.
  • phpMyAdmin — MySQL DBMS administration

How to remove Denwer?

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

What should I do to remove Denver?

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

With this I want to conclude this lesson, I hope it was useful for you. If you have any questions, write in the comments or email me.

Best regards, Chirkov Sergey.

To run PHP scripts, you will need a special server that can recognize and interpret them. In order not to order special hosting on the Internet, you can install a special server directly on your computer Denwer because it is free and does not require special knowledge to install. Another advantage is that it hardly loads the system, as well as its cross-platform nature.

Denwer is a free, excellent program that will allow you to execute PHP scripts directly on your computer. In this article I will talk in detail about how to install denwer, and then I will say a few words about how to use it.

Step-by-step installation of Denwer:

1) Download Denwer
You can download Denver for free from the official website: www.denwer.ru. Denver weighs quite a bit (6.2 MB):

2) Running the installer
Close all browsers, and then run the installer. You should see something like this on the screen:

3) Specifying Installation Options
3.1. The first parameter that needs to be set is installation directory Denver:

In the example under consideration, I did not change the default directory and therefore simply pressed Enter.

3.2. Second parameter - task virtual directory. In principle, this parameter is not particularly important, the main thing is to select some directory that does not yet exist on your computer:

I decided to specify the name of the virtual disk L. To continue the installation, you will need to press Enter:

3.3. The third parameter is choice Denver startup mode(automatically when the OS starts or manually). I always choose item 2, since I don’t use Denver often:

4. Completing the installation
After the installation is complete, your browser should open and inform you that “Denwer was installed successfully”:

Now I will tell you briefly about how to use Denver.

Instructions for using Denver

1. Denver launch
To start Denver, you need to double-click on the "Start Denwer" icon.

After finishing working with Denver, you can close it; there is a “Stop Denwer” icon for this.

2. Checking the work of Denver
Enter the address of any browser in the line: http://localhost/. If everything is installed correctly, the welcome page from Denver should open: http://localhost/denwer/. After this, you can start using Denver.

Where to upload website files to Denwer
First, open “My Computer”, there, after starting Denver, another virtual disk should appear there (in my case L):

Your website files will need to be located in the directory: L:\home\localhost\www:

In the screenshot, I specially opened the index.php file so that you could see the redirect that leads to http://localhost/denwer/ (Denwer’s welcome page), now it becomes clear why when you checked the work of Denver (in point 2), it was automatically opened page http://localhost/denwer/.

Let me sum it up. Denver is installed, delete all files from the L:\home\localhost\www directory and upload your site here. Next, your site will be accessible in a browser when Denver is running at http://localhost/.

Program interface: Russian

Platform:XP/7/Vista

Manufacturer: Dmitry Koterov

Website: www.denwer.ru

Denwer is a project by Dmitry Koterov, which is a regular local server used by web developers to create projects without the need to directly access the Internet. In addition to the server itself, which uses MySQL, Perl, Apache, PHP, etc., this gentleman’s set also includes a software environment (shell) in which a web programmer can work, say, on a local Windows terminal at home.

Key features of the Denwer program

Surely, many website developers have encountered the problem that when creating them, the site often just hangs on the Internet without generating any income. You understand that you first want to fully configure the site, adding all the necessary elements such as text, images, audio or video, and only then upload the finished product to the Internet. The Denwer software environment is just such a constructor.

When creating your website using the Denwer program, as is already clear, you do not need to pay for using hosting, because everything is on the local computer and not on the Internet. Upon completion of the work, of course, you can post the finished site on the Internet, but you can even save it on any removable USB drive such as a regular flash drive.

Actually, you can download the local Denwer server or, as it is also called, localhost on the developer’s website. There are also detailed instructions for installing and configuring the program in Russian. The installation itself takes only a few minutes. As for the configuration, first the Denwer server itself is installed, then its own database is created, after which the site is activated, that is, the designer itself is “uploaded” to the server. The most interesting thing is that the Denwer platform can use anything as such a designer, say, WordPress, Joomla, Drupal, Ucoz or anything else.

A local server created in this way in the Denwer software environment is practically no different from real hosting. Essentially, it has the same components: MySQL databases, Apache server, PHP support, scripts for working with the PhpMyAdmin DB, etc. In addition, the Denwer platform allows you to use many additional plugins and templates. However, for them to work correctly, you first need to install them, test them and make sure they work. First of all, this applies to WordPress. In general, I think many web developers will be satisfied. By the way, the third version of Denwer is a long-awaited software product in this series.

Several articles have been written about installing the server and various additions to it, one of which - my own - I never tire of citing in the links: . Until recently, installing an entire “kitchen” was quite a painstaking task. Now the installation and configuration of components can be done automatically, and Denver will help with this.

Let's take a look at what Denver's basic package includes:

  • Installer (installation on a flash drive is also supported).
  • Apache, SSL, SSI, mod_rewrite, mod_php.
  • PHP5 with GD, MySQL, sqLite support.
  • MySQL5 with transaction support.
  • Template-based virtual host management system. To create a new host, you only need to add a directory to the /home directory; you do not need to edit any configuration files. By default, the directory naming schemes of many popular hosters are already supported; new ones can be easily added.
  • Startup and shutdown control system for all Denver components.
  • phpMyAdmin is a MySQL management system via a Web interface.
  • Sendmail and SMTP server emulator (debugging “stub” on localhost:25, storing incoming letters in /tmp in .eml format); Supports work in conjunction with PHP, Perl, Parser, etc.

Herbalife, herbalife...

If you've ever downloaded distributions over a modem, you've probably wondered: what is the absolute minimum size of distributions before you can work with them. Let's count:

  • Apache: 4.7 MB;
  • PHP5: 9.7 MB;
  • MySQL5: 23 MB;
  • phpMyAdmin: 2 MB.
  • Total: 40 MB

It can be seen that just these components are contained in the basic Denver package, but it takes... about 8.2 megabytes! You probably won’t believe that the original distributions can “lose weight” by more than 7 times without losing functionality. What made it possible to achieve such results?

  • The distributions have been thoroughly combed. All components that are used relatively rarely are included in separate extension packages. Thus, 90% of developers will be able to start working immediately, and the remaining 10% only need to download and install additional packages using installers.
  • Typically, distributions come with various unnecessary files, such as change history or installation instructions. Needless to say, Denver doesn't contain them.
  • To package the archive, one of the most powerful archivers is used - 7-Zip.

Extension packs

If you are a professional developer, you will probably need additional packages:

  • full version of ActivePerl 5.8;
  • PHP5 with a full set of modules;
  • Python programming language;
  • DBMS PostgreSQL or InterBase/FireBird versions 1 and 2;
  • good old PHP version 3 or 4;
  • or even Parser from Lebedev's studio.

You can download and install all this, and the installer included in the package will do the “dirty work”.

Architecture

A distinctive feature of Denver is its complete autonomy. It is as follows.

  • Denver is installed in a single directory and does not change anything outside of it. It does not write files to the Windows directory and does not mess with the Registry. If you wish, you can even install two Denvers at once, and they will not conflict.
  • No NT/2000 “services” are “prescribed”. If you run Denver, it works. If completed, it stops working, leaving no traces behind.
  • The system does not need an uninstaller - just delete the directory.
  • Having installed Denver once, you can then simply rewrite it on other machines (on an arbitrary disk in an arbitrary directory). This will not cause any side effects.
  • All configuration and setup for a specific machine occurs automatically.

The same rules apply to extension packs.

In order to simplify the operation of the complex components and improve compatibility with a real Unix hoster, a special virtual disk appended to the main directory.

A virtual disk is simply a synonym for some folder on a real, or physical, disk. It is connected using the subst command, which is taken care of by Denver scripts. You can work with a virtual disk as with a regular one. In this case, all operations will actually be performed with the specified directory. The mechanism for operating virtual disks is built into the OS and does not lead to any overhead or slowdowns.

Due to the use of a virtual disk, Denver looks like a small Unix from the inside: it has its own directory /home, /usr, /tmp... Various components and servers are located as is customary in Unix. For example, /home contains virtual hosts, and /usr contains software components.

This architecture actually has nothing in common with the Cygwin system (although it is similar). However, some Denver extension packages may use Cygwin for their own internal purposes, but this is always "transparent" to the user.

Contrary to popular belief, Denver is not something static and unchanging. No one is stopping you from installing additional programs and components on top of it (for example, the PostgreSQL DBMS server). They will simply be “like family” to him. You can also set the logic for starting and ending additional services, similar to how it is done in the basic package. So, if you need some kind of system that is not included in the extension packages, feel free to install and configure it manually.

So, if you decide to install Denver, check out the article Installing Denver. There you will also find links to the necessary distributions. Good job!..

Why do you need a local server at all?

In the last decade, there has been a real boom among Web developers all over the world (mostly programmers). They install an Apache server on their Windows machine with various add-ons to it: PHP, Perl, MySQL, etc. - mainly for the purpose of more convenient debugging of sites.

Many (mainly designers) may ask: why do we need a local Web server at all, when pages can be opened just like that - directly from disk? If these are regular (static) HTML pages, then yes, a server is not needed. However, even for such a little thing as SSI (Server-side Includes - directives in pages that allow you to insert the contents of other files in the right place), a server is already needed. Not to mention scripts - they simply won’t run without a server.

Usually all these problems are solved using FTP clients: they upload the corrected pages and scripts to a “real” server on the Internet, see what happened, then go into the editor, fix it, upload it again, etc. to infinity. The main disadvantage of this approach is obvious: you need to be connected to the Internet all the time. It is also very desirable to have good communication, because otherwise the work will progress extremely slowly.

I relatively regularly receive letters with the following - usually veiled - question: what is the difference between “browsing pages by opening a file in a browser” and “browsing using a server”. In the first case, you select from the menu something like File - Open - Review and select the desired file on disk. The browser shows it without any processing, and the path in its address bar looks something like this:

If you open a page “via the server,” something completely different happens. In general, you should get used to the idea that your “local” server is no worse than any other located on the Internet. This means that it also contains sites (one or more), each of which has a specific name. These sites are accessed as usual: you specify the URL in the address bar - usually the name of the site and the path to the document on it:

Already when comparing these two pictures, you can see that when opening a page “through a browser,” the user generally sees something completely different from what he sees when opening a file (compare at least the window headers).

By the way, in the last picture the site name is dklab. Of course, such a name looks somewhat strange - it does not have a suffix.ru, which makes it inaccessible to all other Internet users. However, the site opens great on a local machine, and besides, I will never confuse dklab.ru (a site on the Internet) with dklab (a site on a local machine).

Who did it and why

It all started when one evening I received another batch of letters from users of the article Apache + Perl + PHP4 + MySQL for Windows 95/98: installation guide (it’s good that it’s electronic). The questions were mostly of the same type and either were not resolved at all, or were resolved within one minute, which was due to trivial errors in httpd.conf (forgot to remove a comment, or, conversely, insert something somewhere, etc.). d.)

At that very moment I thought: perhaps 3110 letters from last year's spring TheBat collapse in a folder dedicated to Apache is, to put it mildly, too much. Something urgently needed to be done. That’s how the idea of ​​creating a “Gentleman’s Web Developer’s Kit” came about.

There are a lot of good things to say about the people involved in the project. So, the cast:

Dmitry Koterov Author of the Denver project.

And, of course, all this works only because the developers of Apache, PHP, Perl, MySQL, phpMyAdmin, etc. have worked and are working by the sweat of their brow (and not only), creating programs and servers that are now so popular. Thank you!