Concurrent?
Maximum number of connections that can be processed by the server at the same time (some requests end in 1 seconds, and some requests can be completed in 10 seconds)
Mainstream Internet Web server
Static:
Apache, Nginx, lighttpd
Dynamic:
IIS (ASP, aspx), Tomcat (JSP), resin (JSP)
PHP (fcgi) [with apache,php is a module mod_php5.so, not service]
Installation method
1. Source code Compilation
Cd/usr/local/share/
wget http://mirrors.hust.edu.cn/apache/httpd/httpd-2.2.34.tar.gz
TAR-ZXVF httpd-2.2.34.tar.gz
CD httpd-2.2.34
./configure--prefix=/application/httpd-2.2.34--enable-deflate--enable-expires--enable-headers--enable-modules= Most--enable-so--with-mpm=worker--enable-rewite
Make && make install
2. Yum Installation
Yum Install Httpd-y
Apachectl command
Check syntax
/application/httpd-2.2.34/bin/apachectl-t
View Modules
/application/httpd-2.2.34/bin/apachectl-l
Start
/application/httpd-2.2.34/bin/apachectl start
Shut down
/application/httpd-2.2.34/bin/apachectl stop
Restart
/application/httpd-2.2.34/bin/apachectl restart
Graceful restart
/application/httpd-2.2.34/bin/apachectl Graceful
Configuration file
/application/httpd-2.2.34/conf/httpd.conf
<directory "/application/httpd-2.2.34/htdocs" >
Options Indexes followsymlinks #去掉Indexes以后没有首页的时候就不会展示目录结构
AllowOverride None
Order Allow,deny
Allow from all
Add a virtual host that can be based on domain name, port, IP
vim/application/httpd-2.2.34/conf/httpd.conf Remove Annotations
Include conf/extra/httpd-vhosts.conf
Vi/application/httpd-2.2.34/conf/extra/httpd-vhosts.conf
Directory authorization
Directory "/application/httpd-2.2.34/docs" >
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
Add a virtual Host
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "/application/httpd-2.2.34/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
Errorlog "Logs/dummy-host2.example.com-error_log"
Customlog "Logs/dummy-host2.example.com-access_log" common
</VirtualHost>
Change the working mode
Vim httpd-mpm.conf
Default is Prefork
When compiling, you can specify worker mode
Curl to view the site program version, so you need to hide the version number in default.conf
Curl-i 192.168.56.100
Virtual Hosting: Deploy multiple sites, each requiring a different domain name, site directory, or different port, and different IP. A virtual host is required for an HTTP service to configure multiple sites.
Make IP addresses inaccessible to Web sites
Set the first virtuahost and then give a rewrite
Apache-1: Installation configuration