HTTP installation Configuration _ Learning Notes
Apache:
Ncsa,httpd
A patchy Server = = Apache
Fsf:gnu, GPL
Asf:apache Software Foundation (Apache Software Foundation)
Web:httpd
Tomcat
Hadoop
HTTPD: (1.3, 2.0, 2.2, 2.4)
Web Server,open Source (0.9, 1.0, 1.1 1.1 adds cache capability, supports long connections)
1. Create a process beforehand
2, adaptive on-demand maintenance process (minimum maximum idle process)
3, modular process, the core is small, function by adding modules to implement (including PHP)
4. Support Virtual host configuration in various ways
Single host single Web program, can provide multiple different Web sites
IP-based virtual host
Port-based virtual host
Domain-based virtual host
Supported Features:
HTTPS function (MOD_SSL)
User authentication: Simple authentication, Digest authentication, form authentication
Support for IP-or domain-based ACLs
Support for per-Directory access control
Support for URL rewriting
/USR/SBIN/HTTPD (Mem:prefork)
Httpd:root,root-led process (processes smaller than port 1024 require root boot), responsible for maintaining the worker process
Httpd:apache,apache Work Process
Port: (80/TCP), (SSL 443/tcp)
/ETC/HTTPD Working root directory
/etc/httpd/conf Configuration file Directory
/ETC/HTTPD/CONF/HTTPD.CONF Master configuration file
/etc/httpd/conf.d/*.conf Secondary configuration file
/etc/httpd/modules
/etc/httpd/logs-/VAR/LOG/HTTPSD
Log file: Access log (access_log), error log (Err_log)
/var/www/
HTML static Web page file path
Cgi-bin the path used to provide dynamic content
Cgi:common Gateway Interface (Universal Gateways Interface)
CLIENT-->HTTPD (index.cgi)-->spwan Process (index.cgi)-->httpd--client
FastCGI
Programs: Directives and data
Data: Database Services
HTTPD Service:
Configuration file:
Directive values
Directives are case-insensitive
Values are likely to be differentiated as needed
Professional tools for testing Web services: LoadRunner
Mpm:mutil Path Modules (multi-channel processing module)
Mpm_winnt:windows dedicated (Windows itself supports multithreading)
Prefork: A request is processed with a process
Worker: A request that responds with one thread, initiates multiple processes, starts multiple threads per process, and has a lock mechanism for resource expropriation
Event: A process handles multiple requests, 2.2 does not support such a mechanism, and 2.4 uses this type of request mode by default
Options:
Indexes: Allow index directory
None: No options are supported
FollowSymLinks: Allow access to the file that the symbolic link points to
Includes: Allows execution of server-side containing related documents and scripts
EXECCGI: Running CGI scripts
All: Enable all
Order: Used to define host-based access control
Order Allow,deny
Allow from all
Deny from Deny
For example: Only 192.168.0.1 access is allowed:
Order Allow,deny
Allow from 192.168.0.1
HTTP-T detecting configuration file Syntax format
ELinks Http://host/source/to/path Display text page
-dump exiting interactive mode
-source Display Source code
Set up Web Authentication login:
First, modify the allowoverride value in <directory> to Authconfig
Then configure:
AuthType Basic
AuthName "This is Auth Web ..."
authuserfile/etc/httpd/conf/htpasswd
Authgroupfile/etc/httpd/conf/htgroup
Require Group Mygrp
Require Valid-user
Require User Test
The group file was created manually: Mygrp:test1 test2
Then establish the authentication file, add, delete the user:
htpasswd
-C use when first adding a password file
-M Add user
-D Delete User
Htpasswd-c-m/etc/httpd/conf/htpasswd Test1
Virtual Host:
Apache Services:
Service to multiple different sites
Apache:
Central host
Virtual Host
Based on IP
Ip1:80
Ip2:80
Port-based
Ip:80
ip:8080
Domain-based
Ip:80
Host name is different
Www.test1.com
Www.test2.com
Www.test3.com
To require your host to take effect, you need to note the central host, method: Note DocumentRoot can
Configuration file Contents:
<virtualhost host> Host Definition: Three ways to base your virtual host
ServerName
Serveralias
DocumentRoot "/www/test1/"
<directory "/www/test1" > here is a property definition relative to the file system directory
Options
Allowoverrdie
</Directory>
Alias
Errorlog
Customlog
<location "/first" > here is a property definition for the URL link directory
Defining Request Methods
</Location>
Scriptalias
</VirtualHost>
Dynamic classification:
Client dynamic
Service-Side dynamic
HTTP installation Configuration _ Learning Notes