Installing Web server extension modules. Extension modules for the Apache web server Web service extension module

For Agent 1C:Link to work, you must have installed 32-bit Web server extension modules from the 1C:Enterprise distribution kit.

Please note that installing web extension modules may require Administrator rights.

After installation, you must restart the 1C: Link Agent.

Do the following:

On a PC with Agent, open the control panel and (for Windows 7) go to the "Programs - Programs and Features" section, as shown in the picture below. For Windows XP - open the Control Panel and in it - "Add or Remove Programs".

Next, select the version of 1C:Enterprise that you use from the list of programs and click the “Change” button. You can also select the "Change" option from the context menu, called by right-clicking on the program line in the control panel. This is true for both Windows 7 and Windows XP.

The version of the 1C:Enterprise platform you are using can be clarified by clicking on the "About the program" icon in the 1C application window.

Select to install Web Server Extension Modules as shown in the picture below.

If the computer does not have a distribution kit for the specified version of the 1C: Enterprise 8 platform, you can download it from the website https://users.v8.1c.ru/distribution/

Detailed information about installing and configuring componentsplatform "1C: Enterprise"" available in chapter 2 p manual a administrator "1C: Enterprise"".

In this article I will describe in detail the process of organizing web access to 1C:Enterprise databases8.3 on the IIS (Internet Information Server) web server included in the delivery Microsoft Windows Server. For older versions of 1C:Enterprise (8.1 And 8.2 ) the algorithm for publishing databases is generally similar. The algorithm for setting up IIS for 1C:Enterprise will be discussed, and the process of publishing databases on a web server will also be described for both32-bit, and for 64-bitweb server extension module.

  1. What you will need
  2. Installing IIS Web Server
  3. Installing 1C:Enterprise components
  4. Setting up the operating system
  5. Publishing a database to a web server
  6. Configuring IIS to use the 32-bit Web Server Extension Plug-in
  7. Configuring IIS to use the 64-bit Web Server Extension Plug-in
  8. Connecting to a published infobase via a web browser
  9. Connecting to a published infobase via the 1C:Enterprise client
  10. Virtual Directory Configuration Files
    1. File default.vrd
    2. web.config file

1. What you will need

  1. A computer that meets the minimum system requirements for running a web server controlled by one of operating systems:
    • Microsoft Windows Server 2012 (R2)
    • Microsoft Windows Server 2008 (R2)
  2. Local administrator rights on this computer.
  3. Distribution kit for installing 1C:Enterprise components. To configure a 64-bit web server extension module, a distribution kit for installing a 64-bit 1C:Enterprise server. IN in this example version used 8.3.4.389 . For older versions of 1C:Enterprise ( 8.1 And 8.2 ) the algorithm for publishing databases is generally similar.

2. Installing the IIS web server

We install the Internet Information Server web server, which is included by default with Microsoft Windows Server. When installing, be sure to select the components:

  • Common HTTP Features
    • Static Content
    • Default Document
    • Directory Browsing
    • HTTP Errors
  • Application Development
    • ASP.NET 3.5
    • .NET Extensibility 3.5
    • ISAPI Extensions
    • ISAPI Filters
  • Health and Diagnostics
    • HTTP Logging
    • Request Monitor
  • Management Tools
    • IIS Management Console

I wrote in detail about the process of deploying an IIS web server:

  • In Microsoft Windows Server 2012 (R2) - here. IIS version 8, after installation you should see a Default Web Site page like:

  • In Microsoft Windows Server 2008 (R2) - here. IIS version 7, after installation you should see a Default Web Site page like:

3. Installation of 1C:Enterprise components

On the same server where the IIS web server is deployed, we install 1C:Enterprise (32-bit components), making sure to select the components during installation:

  • 1C:Enterprise
  • Web server extension modules

If you plan to configure a 64-bit web server extension module, you must additionally run the 64-bit server installation program from the corresponding 1C:Enterprise package and install the component:

  • Web server extension module

4. Setting up the operating system

Now you need to install necessary rights to key folders used during web access to 1C:Enterprise databases. For the storage directory for website files published on the web server (default C:inetpubwwwroot) you need to give full rights to the group " Users"(Users). In principle, you can skip this step, but then to publish or change the publication of the database you will need to run 1C:Enterprise as an administrator. To configure the security of this directory, click on it right click mouse and context menu select " Properties"(Properties).

In the properties window that opens, go to the “ Safety" (Security) and press the button " Change» (Edit...), to change existing permissions. The permissions window for this directory will appear. In the list of Groups or user names, select the group “ Users" (Users) and in the list of permissions for the selected group set the flag " Full access"(Full control). Then click " Apply" (Apply) to record changes and close all windows using the button " OK».

Next, you need to give full rights to the directory with installed files"1C:Enterprise" (default C:Program Files (x86)1cv8 for 32-bit expansion module and C:Program Files1cv8 for 64-bit) group IIS_IUSRS. To do this, we perform actions similar to those described above, with the only difference that in order for the required group to appear in the list “ Groups or users" (Groups or user names) you must click the button located under the list " Add"(Add..), and in the window for selecting groups or users, click " Additionally"(Advanced...).

Then click the button on the right “ Search"(Find Now), then select the required group IIS_IUSRS in the search results table and click “ OK».

Group IIS_IUSRS appears in the list of groups or users. We give it full rights to the selected directory and click “ Apply» (Apply) to save changes.

And finally, if publishing is performed for a file database, you must also give the group IIS_IUSRS full rights to the directory containing the files of this infobase.

5. Publishing the database on a web server

Let's move on to directly publishing the database on the web server. To do this, launch 1C:Enterprise in Configurator mode for the database that you want to publish. Then select “ Administration» - « Publishing to a web server...»

The window for setting up publishing properties on the web server will open. The main fields required for publication are already filled in by default:

  • Virtual directory name - the name by which the database on the web server will be accessed. Can only consist of characters of the Latin alphabet.
  • Web server - selected from the list of web servers found on the current computer. In our case, this is Internet Information Services.
  • Directory - the physical location of the directory in which the virtual application files will be located.
  • Using the corresponding flags, you can specify the types of clients to publish, as well as indicate the possibility of publishing Web services. In the table below you can edit the list of Web services that will be published, as well as in the column “ Address» change the synonym by which this Web service will be accessed.
  • It is also possible for the IIS web server to indicate the need to perform authentication on the web server using OS means by setting the appropriate flag.

Having selected the necessary publishing settings, click “ Publish».

If the publication went through without errors, we will see a corresponding message.

Publishing to the IIS web server is always done for the default website and the default application pool. It is worth keeping in mind that when publishing from the configurator, the 32-bit web server extension module will be registered, and the default application pool will be DefaultAppPool- Without configuration, it only works with 64-bit applications. Accordingly, further actions depend on the bitness of the web server extension module that you plan to use. For a 32-bit web server extension, you must enable the application pool to use 32-bit applications, or register a 64-bit web server extension. About it we'll talk below

6. Configure IIS to use the 32-bit Web Server Extension Plug-in

Facilities" (Tools) - " Internet Information Services Manager

Default Web Site- a virtual directory transformed into an application appeared with the name that we specified when publishing the database. The only thing left to complete publishing is to enable 32-bit applications for the default application pool. To do this, go to the “ tab in the connection tree Application Pools"(Application Pools).

In the list of application pools we find a pool with the name DefaultAppPool. Right-click on it and select “ Extra options"(Advanced Settings).

In the application pool settings window that opens, in the group “ Are common"(General) find the item " 32-bit applications allowed» (Enable 32-Bit Applications) and set the parameter value to True. Then save the changes by clicking " OK».

7. Configure IIS to use the 64-bit Web Server Extension Plug-in

You can register the 64-bit web server extension module using the utility webinst.exe the corresponding version located in the directory bin, catalog with installed program"1C:Enterprise", or use the method below.

Let's launch Internet Information Services (IIS) Manager. This can be done from the Server Manager by selecting the “ Facilities" (Tools) - " Internet Information Services Manager» (Internet Information Services (IIS) Manager).

Here, expanding the tree in the connections window, we will see that for the default website - Default Web Site- a virtual directory transformed into an application appeared with the name we specified when publishing the database. To complete the publication, all that remains is to indicate this application use a 64-bit request processor. To do this, open the handler mapping settings page for this virtual directory by selecting “ Handler Mapping» (Handler Mappings) on home page applications.

In the table of handler comparisons we find the handler "1C Web-service Extension". Let's open this handler by double-clicking on the corresponding row in the table.

Let's edit the handler by replacing the path to the executable dll of the 32-bit web server extension module, which is selected in this moment, to the path to the 64-bit version of the library. In this example, we change the path from " C:Program Files (x86)1cv88.3.4.389binwsisapi.dll" on " C:Program Files1cv88.3.4.389binwsisapi.dll» using the selection button. After changing the path, click " OK» to save changes.

8. Connect to a published infobase via a web browser

Well, that seems to be all. To connect to a newly published database, run Internet Explorer, and in the address bar enter a path like http://localhost/<Имя публикации информационной базы> . In this example it is http://localhost/DemoAccounting/.

You can also connect to this information base from any computer on the network by accessing the web server via its internal one (or if the port is forwarded 80 , by external) IP address.

In this case, for 1C:Enterprise to work correctly, the domain name being accessed (or IP address) must be added to trusted Internet Explorer sites, and pop-up windows must be allowed for it. Read more about setting up Internet Explorer for the 1C:Enterprise web client here.

9. Connecting to a published information base through the 1C:Enterprise client

You can also connect to an information base published on a web server using the 1C:Enterprise thin client. To connect, open the “1C:Enterprise” launch window and click the “ Add» to add an information base.

In the window for adding an infobase/group, set the switch to “ Adding an existing infobase to the list" and click " Further».

Enter the name of the database as it will appear in the list information bases(must be unique to this list), select the location type " On the web server" and click " Further».

Enter the address line to connect to the infobase (without the /ru_RU/ prefix). Here you can also specify the proxy server parameters (if any) and the authentication method on the web server. Having specified the necessary settings, click “ Further».

Specify the launch parameters for the infobase and click “ Ready» to complete the wizard.

After which this information base will appear in the list of databases in the 1C:Enterprise launch window. Please note that the Configurator launch mode is not available for of this type connections. Click " 1C:Enterprise» to connect to the information base.

10. Virtual directory configuration files

Let's take a closer look at the structure of the files that were created during the publishing process. If web access to a published infobase does not work for some reason, the configuration files can be edited manually to achieve the desired result (the configuration files from this article for the 64-bit web server extension module can be downloaded here).

Let's go to the directory that we specified when publishing the database. We will see two files in it:

  • default.vrd
  • web.config

Both files are available for viewing and editing using any text editor, for example the Notepad program. Let's take a closer look at the structure of these files.

10.1. File default.vrd

In file default.vrd describes published Web services (element ), and also indicates the name of the virtual application (attribute base) and connection string to the 1C:Enterprise information base (attribute ib). In this example, for a file infobase, the connection string will be as follows:

Ib="File="C:1C_BASEDemoAccounting";"

As you can see from the example, if the connection string contains characters that are illegal according to the XML standard (http://www.w3.org/TR/xml11/), they must be replaced accordingly.

In the connection line you can specify the user's login and password. In this case, the connection to the infobase will be performed on behalf of the specified user. For example, to connect as the user Seller, the connection string will be as follows:

Ib="File="C:1C_BASEDemoAccounting";Usr=Seller;Pwd=123;"

For a server infobase, the connection string will look like:

Ib="Srvr="WIN2012;Ref=Accounting;"

Where WIN2012- name of the 1C:Enterprise server cluster, and Accounting- name of the database in the cluster.

More about the structure this file can be read in the book "Administrator's Guide" 2nd edition, Appendix 2, chapter 3.12.

10.2. web.config file

File web.config is a file that defines parameters for an ASP.NET web application. Every web application must have a file web.config, located in its root directory. Our virtual directory is no exception. The current file contains data about the 1C Web-service Extension handler that processes requests to this application. The handler is configured in such a way that all requests are passed to the library wsisapi.dll located in the directory bin, directory with 1C:Enterprise files. In the case of using server information bases, the version of the library must correspond to the version of the 1C:Enterprise server cluster.

This handler can be found (or added if it does not exist) in IIS Manager. To do this, select the tab with the current application and in the properties window select “ Handler mappings» (Handler Mappings).

In the table of handler comparisons we will see our handler "1C Web-service Extension". If such a handler is not in the list, you should add it by selecting it in the “ Actions" (Actions) item " Adding a script match with wildcards» (Add Wildcard Script Map…).

When adding, enter the name of the handler and indicate the path to the file wsisapi.dll. These parameters can also be changed for the current handler by selecting “ Change…"(Edit...) in the action list window.

You must also make sure that the flag " Performance» (Execute) in the function permission changes window. You can call this window by selecting “ Changing function permissions..." (Edit Feature Permissions...) in the window " Actions"(Actions).

The task is to raise the IIS web server built into Windows and publish a 1C database on it on the 8.3 platform. There is nothing complicated about this.

We have a 2008 r2 enterprise server spinning on a virtual machine. Local administrator rights to it. Platform 1C 8.3.6.2041. We will create an empty information base. And so let's get started. Join our group on VK! Under repair! Smart workshop!

Installing the webserver role (IIS)

First you need to install the webserver role. Opening Server Manager, select the branch on the left Roles, click on the right Add a role.

We get to the step of selecting Server Roles and check the box next to Web Server (IIS). Click next. Now you need to correctly select the services of the installed role. Check the boxes exactly as in the screenshot below.

We complete the installation. The Add Role Wizard should tell us after a certain time that the role and all role services have been successfully installed:

Now we need to check if everything worked out well. Open any browser and go to the address http://localhost. We should see a happy picture like this:


installation of the 1c platform and components

This means that our web server has started up correctly and everything is working fine. So let's move on to 1s now. It is necessary to install a platform. The only caveat when installing the platform is to choose:

  • 1C:Enterprise
  • Web server extension modules
setting access rights

First of all, we need to configure the rights of the folder where our web server root directory is located. If you haven't changed anything, then by default it is C:\inetpub\wwwroot. Go to the folder C:\inetpub\ select a folder wwwroot, Right-click on it and go to properties. Go to the tab Safety. By clicking on the change button, we go directly to setting up permissions. We find it in the list Groups and users, group Users, and by clicking on it put it in the column below Group Permissions, missing checkmarks in the column Allow.

Now you need to give rights to the folders with 1c installed. Let's move on to them, by default for the 32-bit version 1c is in the folder C:\Program Files (x86)\1cv8 for 64-bit in the folder C:\Program Files\1cv8. Also select the folder 1cv8 go to its properties, go to the tab Security -> Edit. But instead of selecting a group from the list, we need to add it there first. To do this, press the button Add, in the window that appears, press the button Additionally.


Next, click on the button Search and look in the result list IIS_IUSRS by adding it double click, brings us back to the window Selecting Users or Groups but with the group already included in the list. Click OK, and back to the window Group Permissions We put all the checkboxes in the allow field for the newly added group.

Having set permissions for folders with 1c files, we are left with the last thing. Give permissions to the group IIS_IUSRS folder where we have the 1C database itself.

The necessary preparations have been made. Now let's move on to publishing.

Publishing 1c on a web server

You need to launch 1c in configurator mode, selecting the database you need to publish. In my case, this is an empty database and there is only one.

In 1c configurator mode, go to the menu Administration -> Publishing to a web server.


After looking at the parameters and making sure that, in essence, everything suits us, we click Publish. If your publication went through without errors, let's move on to the last step.

setting up IIS to work with a 32-bit 1C web server extension module

Let me remind you that we used a 32-bit platform and a web server extension module from 1c, respectively. Therefore, in this case, we still need to allow the default application pool to run - DefaultAppPool run 32-bit applications. It's not difficult to do. Let's go Server Manager -> Roles -> Web server(IIS) -> Service Manager (IIS) -> Application Pools -> DefaultAppPool. Right click on DefaultAppPool call the context menu and select from it Extra options.


We are looking for a line 32-bit applications allowed and on the contrary we put TRUE

CONFIGURING IIS TO WORK WITH A 64-BIT 1C WEB SERVER EXTENSION MODULE

If we used a 64-bit platform and a web extension module, respectively, then we need to do the following manipulations:

Let's go Server Manager -> Roles -> Web server(IIS) -> Service Manager (IIS)-> And select the application converted from the virtual directory with the name that we specified when publishing the database. In the right field go to the section Handler Mappings. Publication of 1c 8.3 on the iis web server Publication of 1c 8.3 on the iis web server

Join our group on VK!

In the 1C:Enterprise system 8. In this article we will consider the process of publishing a configuration storage server on the IIS web server in order to be able to access the storages served by the server via the protocol http(or https).

1. Installation of the 1C:Enterprise configuration storage server 8

First of all, it is necessary to install the configuration repository server itself, since publication is carried out directly for the server and through it interaction with the repository occurs. Read more about this in the article:

2. Installing the IIS web server

Next, you need to activate the IIS web server included in Windows, if this has not been done previously. The web server and the configuration storage server can be located either on the same machine or on different computers in the same local network. During installation, you must select the following components:

  • Common HTTP Features
    • Static Content
    • Default Document
    • Directory Browsing
    • HTTP Errors
  • Application Development
    • ASP.NET 3.5
    • .NET Extensibility 3.5
    • ISAPI Extensions
    • ISAPI Filters
  • Health and Diagnostics
    • HTTP Logging
    • Request Monitor
  • Management Tools
    • IIS Management Console

You can read more about installing the IIS web server in various operating systems of the Windows family in the following articles:

After installing the web server, on a computer running IIS server in the browser at the address http://localhost should appear start page (Default Web Site) web server of the corresponding version.

3. Installation of 1C:Enterprise web server extension modules 8

On the same computer where the IIS web server is running, you must install the 1C:Enterprise web server extension modules version 8, which is similar to the version of the configuration storage server. In addition, at the time of writing, the configuration storage server could only be a 32-bit application, therefore the web server extension modules must be installed from a 32-bit distribution of the 1C:Enterprise 8 system.

You can read more about installing 1C:Enterprise 8 program components in the article:

4. Setting up access to 1C:Enterprise web server extension modules 8

In order for the IIS web server to be able to work with the 1C:Enterprise web server extension module 8 installed in the previous step, you must give full rights to the directory with these components (by default C:\Program Files (x86)\1cv8\ for "1C:Enterprise" 8.3 and C:\Program Files (x86)\1cv82\ for "1C:Enterprise" 8.2) group IIS_IUSRS.

To do this, right-click on the required directory and select “ Properties» (Properties) in the context menu.

In the properties window, go to the “ Safety" (Security) and press the button " Change» (Edit...), to change existing permissions. The permissions window for this directory will appear. In it, click located under the list “ Groups or users» (Groups or user names) button « Add"(Add..), and in the window for selecting groups or users, click " Additionally"(Advanced...).

Then click the button on the right “ Search"(Find Now), then select the required group IIS_IUSRS in the search results table and click “ OK».

Group IIS_IUSRS appears in the list of groups or users. We give it full rights to the selected directory and click “ Apply» (Apply) to save changes.

5. Create a configuration file

Next, we proceed directly to publishing the previously installed configuration storage server to the previously installed IIS web server. Let's start with the fact that in the site's storage directory Default Web Site web server (default C:\inetpub\wwwroot) create a directory with the name of the future publication, let it be a directory with the name repository.

And then in this catalog create a file with the extension .1ccr(let, by analogy with a directory, this be a file named repository.1ccr) and with content:

Where<StorageServerName> network name or IP address of the computer on which the configuration storage server is running.

6. Setting up the application in IIS

Now, if you start the Internet Information Services (IIS) Manager and expand the tabs " Websites" (Sites) - " Default Web Site"We will see the directory that we created in the previous step. Let's convert this virtual directory into an application. To do this, right-click on it and select “ Convert to Application"(Convert to Application).

After that, you need to create a handler for this virtual application. To do this, select the application in the connection tree and select “ Handler Mapping» (Handler Mappings).

In the handler mapping window that opens, in the menu “ Actions"(Actions) on the right select the item " Adding a script match with wildcards» (Add Wildcard Script Map…).

The window for adding a new handler will open. In it we indicate the path to the 1C:Enterprise web server extension module, and specifically to the library wsisapi.dll, which is stored in the directory bin, the directory specified when installing the 1C:Enterprise system components in this manual. We also set the name of the handler and click “ OK».

Add this extension ISAPI as allowed to the ISAPI and CGL restrictions list by clicking " Yes" (Yes) in the window that appears.

After which, the newly added handler should appear in the handler mapping list of our virtual application. All that remains is to add permission to execute this handler. To do this, right-click on it and select “ Changing function permissions...» (Edit Feature Permissions...).

In the permissions window that opens, set the flag in the “ Performance"(Execute) and press " OK».

As I wrote earlier, the configuration storage server is a 32-bit application. Accordingly, you must allow the application pool that serves this virtual directory to run 32-bit applications. To view which pool serves a specific virtual directory, you need to right-click on it in the connection tree and select “ Application management" (Manage Application) - " Extra options"(Advanced Settings...).

In the window that appears, the parameter “ Application Pool" (Application Pool) and defines the application pool that serves this virtual directory, in this case it is DefaultAppPool. In the same window you can change, if necessary, given value parameter.

In order to configure an application pool to work with 32-bit applications, you need to find it in the application pools window, available on the " tab Application Pools"(Application Pools) in the connection tree, right-click on it and select " Extra options…"(Advanced Settings).

In the window that appears additional parameters application pool, change the parameter " 32-bit applications allowed" (Enable 32-Bit Applications) to value True.

It is necessary to remember (!) that in this case the pool will no longer correctly process 64-bit applications. Therefore, if you have 64-bit applications on your web server, such as those served by the 64-bit web server extension, you should create a separate application pool, enable 32-bit applications on it, and set it as the pool for the current virtual directory.

Having set the necessary parameters, click “ OK».

7. Connect to storage

Well, all components of the 1C:Enterprise system are installed, the IIS web server settings are completed and you can proceed directly to working with the storage serviced by the configuration storage server via the protocol http. To create a repository (you can read about creating a repository in the article “”) and connect infobases to the repository, you must use an address like:

http://<ИмяВебСервера>/<ИмяПриложения>/<Файл.1ccr>/<ИмяХранилища>

For example, for the parameters used in this article, the name might be:

Http://WIN2012R2/repository/repository.1ccr/Accounting

Http://localhost/repository/repository.1ccr/Accounting

or even like this:

https://site/repository/repository.1ccr/Accounting

Did this article help you?

If you have already read the introductory material about the Apache server and the article describing the differences between different versions, installed and produced initial setup server, then we can begin to consider the Apache modular system. The fact is that this web server, in fact, consists of one mandatory module - the core (Apache Core), which performs the simplest server tasks. All other functions are described in additional modules. In this article we will look at some Apache modules, both commonly used and little known to web developers.

The advantage of this structure is that you can connect and disconnect additional modules at any time, using exactly the server configuration that is needed to complete your tasks. Thus, Apache will take up exactly as much space as it needs to work, and “extra” functions will not load the server’s memory, increasing the overall performance of the system.

The Apache core performs the most basic server functions and allows you to connect additional modules

We need to start talking about modules, of course, with the core of the system. It is to this that all additional modules are attached, like the grains of a pine nut to the core. The kernel performs those functions without which Apache simply could not be called a web server. It regularly accepts browser requests, returns responses to them in the form of pages, and so on, but most importantly, it allows you to connect additional modules.

The server delivery includes a whole set of modules designed to work in multiple modes. running processes. It's no secret that most existing operating systems allow you to work with multiple tasks simultaneously. Thanks to this group of modules, Apache can take advantage of all the capabilities of such systems. In addition to the main mpm_common module, you can find a module optimized for each of the most popular platforms (Windows, OS/2, BeOS, Netware, and so on).

If you want to use all the .htaccess files, then you should install the mod_access module, which is responsible for access to directories and files on the server. With its help, you can deny or, on the contrary, allow access from certain IP addresses or networks.

The mod_actions model allows you to run scripts while accessing a specific file type

The mod_actions module contains two directives regarding the launch of CGI scripts. "Actions" is responsible for launching the executable file at the moment when the user requests a file of a certain type. In this way, you can, for example, organize image processing before sending it to the user or maintaining statistics. The second directive, “Script,” allows the program to be executed when a file is requested using a specific method (GET, POST, or other special method). With its help, you can install a universal form processor that will perform, in addition to standard actions, the actions you need. This may include processing data before entering it into the database, sending it by mail, maintaining statistics, and so on.

The mod_alias module is responsible for redirection and creation of aliases

If you need to use redirection or alias functions, you will need the mod_alias module. It contains directives that allow you to associate an alias with a specific directory. For example, your directory with pictures looks like this: /pub/we/images/, that is, access to it is available, but through HTTP protocol it is not available. If you don't want to move it for some reason, you can make an alias: "Alias ​​/img /pub/we/images". After this, users typing the address http://your_site/img/ in their browsers will be taken to the desired directory with images. By the way, such redirection is used for a directory with CGI scripts.

Using the mod_asis module, you can provide the client with a page “as is”, without processing by the server

Another interesting, but not very often used by webmasters module is mod_asis, which allows you to “give” some files to the client without processing by the server. To do this in configuration file you need to add the line "AddHandler send-as-is asis", where "asis" is the file extension. Now, when the browser requests a file with this extension from the server, it will go to it directly. Apache will only add the "Server" and "Date" identifiers to the header; everything else - for example, the status - will be sent "as is".

Modules from the mod_auth family are responsible for user authentication

A number of modules are designed to authenticate users on the site. This is understandable, because the problem of security and access control is quite acute. We will describe only those modules that are included in the standard distribution of the Apache server, but note that third party manufacturers Quite a lot of other modules have been created that you can also try to connect and use yourself.

Another type of authentication is digital (HTTP Digest Authentication), which supports data encryption with an MD5 key and is considered more reliable than basic. Apache has a mod_auth_digest module that allows you to use it. For you, setting up such authorization will be practically no different from the previous case. Only to create files you will need to use the htdigest utility. In general, the topic of user authentication when creating Internet sites is very voluminous and interesting. It deserves a separate article, but here we have tried only to describe the main capabilities of the Apache server in this area.

Functions from the mod_autoindex module allow you to automatically create index files

The mod_autoindex module is designed to automatically generate index files. This can be very convenient if you have created a file archive and you just need to place the file names on the index page. You don't have to create them manually, just use the appropriate directives. With their help you can sort files, add different types files with their own icons, display or hide files with specified extensions, and so on.

Using functions from the mod_deflate module, you can compress files before sending them to the user to speed up loading

To take advantage of the pre-compression feature text files from your server, you need to install the mod_deflate module. It will allow you to enable packaging of outgoing files before sending them to users. After receiving, the browser itself will unpack the file and show it to the visitor. This will allow you to reduce outgoing traffic, speed up downloading of files from the server and improve the user experience of your site. The server documentation provides good example recommended configuration - it will allow you to avoid trouble if the user has old browser, which does not support packaging capabilities, and therefore we will not present it here.

The mod_status module allows the administrator to monitor the health of the server without additional programs. The system itself will record in a file all requests received on it, the time of server reboots and shutdowns, computer processor load and other information. To do this, in addition to installing the module, you need to create a directive in the httpd.conf file:


SetHandler server-status

Order Deny,Allow
Deny from all
Allow from .foo.com

In this case, at http://your_site/server-status you can look at the server statistics. It will only be available if you log in from a computer located in the domain.foo.com. However, you can set other access restrictions.

And the last module that I would like to talk about will allow you to turn your web server into a proxy server. This is done by connecting the mod_proxy module and other modules of this “family” to Apache. Apache can operate in two proxy modes: forward and reverse. Direct mode requires special settings in the visitor's browser and allows, for example, local network users to access the Internet. There is no reverse additional settings does not require and provides access to computers that are not visible from the outside. A typical example is Internet users accessing a site located within a local network.

By the way, Apache allows you to organize not only HTTP, but also FTP proxies with similar functions. In addition, a developed system of directives makes it possible to finely differentiate access rights to networks, allow or prohibit the reception of certain types of files, and so on.

Of course, we were not able to cover all possible Apache modules within one material; even there are too many standard ones. But, on the other hand, it doesn’t make much sense to talk about them all, because some of them are very well known to web developers, and the other part is needed only by a very narrow circle of people. We tried to talk mainly about modules that are needed by many, but not everyone knows about their existence.