Save the downloaded file, httpd-2.2.25-win32-x86-nossl.msi, 5,754,604 bytes, in a temporary directory. See the next section on how to install Apache Windows version. Table of Contents. Info; Deps; Files; Scripts; ChangeLog; Location; Others versions; Analyse.
Personal blog address: http://www.pojun.tech/ Welcome to visit
Usually, as we say, there are two types of server applications: http server and application server. The typical representatives of http server are Apache Http Server and Nginx. The typical representatives of application server are IIS,Tomcat and jetty.
_Many friends who have done java development should know Apache Tomcat, but what are the specific differences and connections between them? You can inquire about the information on the Internet by yourselves, or you can refer to it by yourselves. https://www.zhihu.com/question/32212996 Let's get to know.
Of course, you can also go to this website to check the market share of current mainstream servers. https://www.netcraft.com/
At present, in the field of computer operation and maintenance, there are several popular architectures, LAMP and LNMP. Here A in LAMP refers to Apache Httpd Server.
Httpd version 2.2 is installed by default in_CentOS 6 system, while Httpd version 2.4 is supported by default in CentOS 7 system. They are different in use. At the same time, if you want to install Httpd2.4 on CentOS 6, it will take some effort.
In this article, let's take a look at the configuration of Apache Httpd 2.2. The rest will be introduced later.
The Programming Environment of httpd in CentOS 6
Check for syntax errors in the modified configuration file
- The library, boahttpd, is designed to create a cgi-featured http server (normally called as boa-server)easily and fast. That means you can easily add CGI support to your server application. Further more, it support filter and allows you to prevent unauthorized access. It's a multi-threaded server.
- Available in version 2.2.4 and later. This argument is followed by a header name, which can include the final colon, but it is not required. Case is ignored for set, append, merge, add, unset and edit.
- Project site: Screen shots: Download: Download Apache HTTP Server 2.2.22 https://github.com/tim-lebedkov/packages/releases/download/202004.
Configuration files for httpd service scripts
Document Root Directory of Website Pages
Main program file
Log File Directory
Help Document Pack
Configuration format
All of the above can be viewed in rpm-ql httpd.
Having learned the basic information above, let's start the httpd service.
Httpd 2.2.34 Rpm
From the information above, we can see that there are two small problems. Now let's solve these two small problems. From the description of the problem, we can see that HTTPD service can not specify the name of the server host, and it is better to specify it with 127.0.0.1.
Let's modify the file / etc/httpd/conf/httpd.conf.
In this way, when you restart, there will be no problem hints.
Common configurations of httpd 2.2
The configuration information mentioned here is located at / etc/httpd/conf/httpd.conf
1. Display version information of server
Displaying the version information of the server means that in our daily work, we may use some means to obtain the server information of some network segments. If the information of our HTTP server is completely exposed to a strange user, it will greatly lead to the security risk of the server.
Below is the server information that we get to Microsoft through tools. Under the Tucao, Microsoft even uses other people's servers.
Here is the information about my local Http 2.2 server
Here we can see that not only the version of the server is exposed, but also the information of the operating system. Next, we will introduce the Httpd server display information settings.
_Configuration using Server Tokens Major | Minor | Min [imal] | Prod [Product Only] | OS | Full.
Generally speaking, prod is recommended. The less information is exposed, the more secure it is.
2. Modifying IP and PORT for listening
The configuration format is Listen [IP:]PORT
- IP is omitted as 0.0.0;
- At least one Listen instruction can be repeated many times
- Modify the monitor socket and restart the service process before it takes effect
3. Persistent connection
_Persistent Connection: Connections are established, each resource will not be disconnected after the completion of acquisition, but continue to wait for other requests to complete, the default closure of persistent connections.
Conditions for disconnecting a persistent connection:
- Quantitative Limitation: Assume 100
- Time limit: HTTPD-2.4 supports milliseconds in seconds.
Side effects: For servers with large concurrent access, the persistent connection function will use some requests that are not responded to
Solution: Use a shorter durable connection time.
4. MPM (Multi-Processing Module) Multiprocessing Module
httpd 2.2 provides three different types of multiprocessing modules. Prefork, worker, event (experimental stage).
To specify the appropriate processing module, modify the / etc/sysconfig/httpd file.
Each multiprocessing module is configured to open / etc/httpd/conf/httpd.conf
Configuration information of prefork module
The meaning of the parameters is shown below.
- StartServers: The default number of processes at the start of the service
- MinSpare Servers: Minimum number of processes
- MaxSpareServers: Maximum number of idle processes
- Server Limit: Maximum number of processes, maximum 20,000
- MaxClients: Maximum concurrency
- MaxRequestsPerChild: The maximum number of requests that a subprocess can handle. After processing MaxRequestsPerChild requests, the child process will be terminated by the parent process, at which time the memory occupied by the child process will be released (never released at 0).
Configuration information of worker module
The meaning of the parameters is shown below.
- StartServers: The default number of processes at the start of the service
- MaxClients: Maximum concurrency
- MinSpareThreads: The minimum number of idle threads, below which the system will immediately start a new process
- MaxSpareThreads: Maximum number of idle threads, which may conflict with the StartServers value
- ThreadPerChild: Number of threads supported by each process, because this value causes conflicts between StartServers and MaxSpareThreads values.
- MaxRequestsPerChild: The maximum number of requests that a subprocess can handle. After processing MaxRequestsPerChild requests, the child process will be terminated by the parent process, at which time the memory occupied by the child process will be released (never released at 0).
5. DSO: Dynamic Shared Object Dynamic Module Configuration
_Use the httpd-M command to view the dynamic modules currently loaded.
Configuration specifies the implementation module loading format: LoadModule < mod_name > < mod_path >
Module file paths can use relative paths: ServerRoot is specified in the / etc/httpd/conf/httpd.conf file relative to ServerRoot (default / etc/httpd)
For example, auth_basic_module/mod_auth_basic.so is the module that specifies that the user needs to provide authentication when accessing the server.
6. Define the Document Page Path of'Main'server
The so-called default home page means that when we access it only through domain name, the system will jump to a page by default. This page is the default home page, so the default home page path can be set here.
The path that DocumentRoot points to is the starting position of the URL path
7. Define the main page of the site
The home page of the site is what we call the default home page.
8. Common mechanisms of site access control
There are two kinds of access control mechanisms: client source address and user account.
- Path Control Based on File System
9. <Directory> Access Control Based on Source Address
- Options: A list of options separated by one or more blank characters is followed. Pre-election +,- Represents adding or deleting specified options.
- Indexes: designative URL When there is no resource file in the path that matches the defined home page resource, the index list is returned to the user.
- FollowSymLinks: Allow access to source files pointed to by symbolically linked files
- None: Disable All
- All: All permissible
- AllowOverride: Which instructions related to access control can be placed in a specified directory.htaccess(from AccessFileName In a specified) file, the previous configuration instructions are overwritten and valid only for statements.
- AllowOverride All: All instructions are valid
- AllowOverride None: .htaccess Invalid files such as AllowOverride AuthConfig Indexes except AuthConfig and Indexes Other instructions cannot be overwritten
- order and allow,deny:
- order: Define the order of validity; write down the default rule
Order allow,deny
Order deny,allow
Allow from, Deny from
- order: Define the order of validity; write down the default rule
Here are some examples
10. Log Settings
Error log
loglevel optional values: debug, info, notice, warn,errorcrit, alert, emerg
Access log
Use of logs
Reference help: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#logformat
- % h Client IP Address
- % l For remote users, mod_ident ity is enabled to be valid, usually a minus sign '-'
- % u authentication (basic, digest) remote user, a minus sign for non-login access -'
- % The time when the t server receives the request
- % R First line of request, which means the first line of the request message, records the 'method', 'URL' and protocol version of the request.
- %> s response state code
- % b The size of the response message in bytes; excluding the header of the response message http
- % {Referer}i requests the value of the first 'referer' in the message; that is, from which page the hyperlink jumps to the current page
- % The value of the first 'User-Agent' in the {User-Agent}i request message; that is, the application that made the request
11. Setting the default character set
Set the default character set of the server. Usually UTF-8 is used. This is an international universal character set.
12. Define path aliases
After the alias is set, when we access through the url, the server automatically points the resource path to the location indicated by the alias.
For example, http://127.0.0.1/icons/ =>/var/www/icons/
13. User-based access control
Authentication Question: WWW-Authenticate: Response Code 401, Deny Client Request, and Explain Request Client to Provide Account and Password
Authorization: The client user fills in the account number and password and sends the request message again; when the authentication passes, the server sends the response.
There are two ways of resource authentication:
- Basic (plain text)
- digest (message digest authentication, poor compatibility)
Httpd 2
Security Domain: A path that can be accessed only after user authentication is required; it should be identified by name in order to inform the user of the reason for authentication.
User's account and password:
- Virtual Account: Authentication Identity Only Used to Access a Service
- Storage: Text file, SQL database, ldap directory storage, nis, etc.
(1) Examples of authentication configuration based on basic
1. Define the security domain
Create a new configuration file ending with. conf and place it in / etc/httpd/conf.d / directory.
This directory is the path to the custom configuration file. / etc/httpd / is the Server Root we mentioned earlier
2. Provide account and password storage (text file), use special commands to complete the creation of such files and user management.
(2) Group-based authentication configuration
2. Create user account and group file, group file: each line defines a group
Group-based authentication configuration example
14. Virtual Host
(1) ip-based: prepare at least one IP address for each virtual host
(2) Port-based: Use at least one separate port for each virtual host
Port-based configuration allows different ports to be monitored for a host, but it is important to note that the listen port number must be added before the configuration file.
(3) Based on FQDN: Use at least one FQDN for each virtual host
Domain name-based virtual host. It's very important to add NameVirtualHost *:80 If you want to use this method. If you don't add shares, there is no effect.
Summarize the configuration method of virtual host
The configuration method structure of the virtual host is as follows. It is recommended that the configuration be stored in a separate configuration file.
15. status page
The status page is compiled in a dynamic module, and if you want to use this function, you need to add the dynamic module to the configuration file.
The successful status page is shown in the following figure
After the above configurations, we have a general understanding of the basic settings of Apache httpd 2.2. If you want a detailed configuration, you can refer to Apache's official documentation. http://httpd.apache.org/docs/2.2/ If you have any questions, please leave a message.
Added by djmc48 on Mon, 20 May 2019 23:45:01 +0300
Apache HTTP Server 2.2.22 was released recently (January 31, 2012). As usual, this version is a security and bug fix release. A list of security vulnerabilities that were fixed can be found here. The complete official changelog can be found here. And here are the 32 bit and 64 bit binaries for Windows.
The binaries were compiled with Visual C++ 2008 (MSVC9) against latest versions of OpenSSL (1.0.0g) and zlib (1.2.6), and have IPv6 support. The 64 bit binaries no longer have the bug that was causing Apache to crash when mod_rewrite logging was enabled.
Net framework 4 0 v 30319 download offline installer. The installers are not digitally signed this time since my code signing certificate has expired. So, please use the provided file hashes instead to verify the integrity of the installers.
Download
apache_2.2.22-x64-openssl-1.0.0g.msi (Mirror 1) (Mirror 2)
CRC32: D93E4E06
MD5: 8F0737B288F2A9D68CF591502ECF3CC1
SHA-1: 4DD9DE88FBCCA7E150973E80D2DF09636D0941CA
apache_2.2.22-x64-no-ssl.msi (Mirror 1) (Mirror 2)
CRC32: 73EB826E
MD5: FB58037F6E234F3B712575C9E15532AA
SHA-1: 956B19AD66463847C337BEFA8D79E9E94ECE8ECB
apache_2.2.22-x86-no-ssl.msi (Mirror 1) (Mirror 2)
CRC32: 3BE80E77
MD5: F1699673291707FA0E5D4210E8495F0B
SHA-1: D741DD09285F079F55F92393C1794F4A156DACAA
apache_2.2.22-x86-openssl-1.0.0g.msi (Mirror 1) (Mirror 2)
CRC32: 75710F79
MD5: BCAF67AF7ACF6412CF8DCC20C4F18042
SHA-1: 2CCC3773CB58BFB4CFB3D6D5E6D56DD302D0538B
Related Posts:
Next Post:PHP 5.3.10 x64 (64 Bit) for Windows
Previous Post:PHP 5.3.9 x64 (64 Bit) for Windows