欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Apache HTTP Server
来自开放百科 - 灰狐
(版本间的差异)
小 |
|||
(未显示2个用户的43个中间版本) | |||
第1行: | 第1行: | ||
+ | {{SeeWikipedia}} | ||
+ | |||
Apache HTTP Server | Apache HTTP Server | ||
− | + | [[文件:LAMP-stack.png|right|LAMP stack]] | |
+ | |||
+ | ==简介== | ||
+ | Apache HTTP Server(也被称为Apache httpd)是Apache软件基金会的一个创建健壮的、工业级的、功能强大的、开放源代码的HTTP(Web)服务器的项目。欲知详情,请查看[http://httpd.apache.org/ABOUT_APACHE.html About Apache]页面。 | ||
+ | |||
+ | ==是什么?== | ||
+ | * 一个强大的、灵活的、兼容HTTP/1.1规范的web服务器 | ||
+ | * 实现了最新的协议,包括HTTP/1.1(RFC2616) | ||
+ | * 具有高度的可配置性和使用第三方模块的可扩展性 | ||
+ | * 可以通过使用Apache模块API编写自己的模块进行定制 | ||
+ | * 在非限制性许可证下提供所有的源代码 | ||
+ | * 可以运行在 Windows 2003/XP/2000/NT/9x 、Netware 5.x 及以上版本、OS/2 、大多数Unix版本以及其它操作系统上 | ||
+ | * 被非常活跃的进行开发 | ||
+ | * 鼓励用户反馈新想法、bug报告、补丁程序 | ||
+ | |||
+ | ==功能== | ||
+ | |||
+ | ==项目== | ||
+ | |||
+ | ==指南== | ||
+ | *在 Debian3.1 上安装 Apache 2 + PHP5 + MySQL5 [[debian3.1_apache2_php5_mysql5]] | ||
+ | *在 Debian 上安装 Apache2 + MySQL5 + PHP5 + GD + Zlib + libpng + Jpeg v6b + FreeType2 | ||
+ | *[[Install Apache2 On Debian]] with PHP,Python,Ruby,Perl,MySQL,PostgreSQL | ||
+ | 点击 [[LAMP Install on Debian]] | ||
+ | *在 WinXP 上安装 Apache 2 + PHP5 + MySQL5 [[winxp_apache2_php5_mysql5]] | ||
+ | *[[Red Hat Enterprise Linux install LAMP]]: 已经为你准备好安装包,只需选择安装: Apache,PHP,Python,Perl,SSL... | ||
+ | * [[WAMP]] (www.wampserver.com/en/index.php) | ||
+ | * [[XAMPP]] (www.apachefriends.org/en/xampp.html) | ||
+ | |||
+ | ==启用SSL== | ||
+ | #apt-get install apache-ssl | ||
+ | or | ||
+ | /etc/apache2# a2enmod ssl | ||
+ | /etc/apache2# apache2-ssl-certificate | ||
+ | |||
+ | creating selfsigned certificate | ||
+ | replace it with one signed by a certification authority (CA) | ||
+ | |||
+ | enter your ServerName at the Common Name prompt | ||
+ | |||
+ | If you want your certificate to expire after x days call this programm | ||
+ | with -days x | ||
+ | Generating a 1024 bit RSA private key | ||
+ | ...............................................................++++++ | ||
+ | ....++++++ | ||
+ | writing new private key to '/etc/apache2/ssl/apache.pem' | ||
+ | ----- | ||
+ | You are about to be asked to enter information that will be incorporated | ||
+ | into your certificate request. | ||
+ | What you are about to enter is what is called a Distinguished Name or a DN. | ||
+ | There are quite a few fields but you can leave some blank | ||
+ | For some fields there will be a default value, | ||
+ | If you enter '.', the field will be left blank. | ||
+ | ----- | ||
+ | Country Name (2 letter code) [GB]: | ||
+ | State or Province Name (full name) [Some-State]:GZ | ||
+ | Locality Name (eg, city) []:SZ | ||
+ | Organization Name (eg, company; recommended) []:huihoo | ||
+ | Organizational Unit Name (eg, section) []:debian | ||
+ | server name (eg. ssl.domain.tld; required!!!) []:demo.huihoo.com | ||
+ | Email Address []:[email protected] | ||
+ | |||
+ | #/etc/apache2/sites-available/ cp default ssl_site | ||
+ | 在/etc/apache2/ports.conf 中添加 Listen 443 | ||
+ | 修改/etc/apache2/sites-available/ssl_site, 将监听端口 改为 443 | ||
+ | 在配置文件中加入 | ||
+ | SSLEngine On | ||
+ | SSLCertificateFile /etc/apache2/ssl/apache.pem | ||
+ | |||
+ | <VirtualHost 192.168.1.22:443> | ||
+ | ServerAdmin [email protected] | ||
+ | ServerName www.mysite.com:443 | ||
+ | DocumentRoot /var/www/mysite | ||
+ | |||
+ | # /etc/init.d/apache2 restart | ||
+ | https://demo.huihoo.com:443/ | ||
+ | |||
+ | ==Modules== | ||
+ | *[[mod_pagespeed]] | ||
+ | *[[mod_python]] | ||
+ | *[[mod_perl]] | ||
+ | *[[mod_ruby]] | ||
+ | *[[mod_fcgid]] | ||
+ | *[[mod_gcj]] | ||
+ | *[[mod_xml]] | ||
+ | *[[mod_mbox]] | ||
+ | *[[mod_pop3]] | ||
+ | *[[mod_arm4]] | ||
+ | *[[mod_smtpd]] | ||
+ | *[[mod_auth_mysql]] | ||
+ | *[[mod_vhost_mysql2]] | ||
+ | *[[mod_bt]] | ||
+ | *[[mod_video]] | ||
+ | *[[mod_spin]] | ||
+ | *[[mod_xmlrpc]] | ||
+ | *[[mod_uno]] | ||
+ | *[[mod_uid]] | ||
+ | *[[mod_rewrite]] | ||
+ | *[[mod_proxy]] | ||
+ | *[[mod_status]] | ||
+ | |||
+ | *http://httpd.apache.org/modules/ | ||
+ | *http://modules.apache.org/ | ||
+ | *[http://docs.huihoo.com/apache/httpd/2.2-cn/mod/ Apache2.2模块索引] | ||
+ | |||
+ | ==问题== | ||
+ | 503 Service Temporarily Unavailable | ||
+ | 当每个IP超过最多设定的连接后就会有下面的提示:Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. | ||
+ | |||
+ | 解决方法: 将 MaxCoonPerIP 再弄大些。 | ||
+ | <IfModule mod_limitipconn.c> | ||
+ | <Location /debian> | ||
+ | MaxConnPerIP 25 | ||
+ | </Location> | ||
+ | </IfModule> | ||
+ | [warn] _default_ VirtualHost overlap on port 80, the first has precedence | ||
+ | NameVirtualHost *:80 // 去掉注释 | ||
+ | |||
+ | ==Jetty== | ||
+ | *[http://wiki.eclipse.org/Jetty/Tutorial/Apache Jetty/Tutorial/Apache] | ||
+ | https http | ||
+ | ---------> Apache -------> Jetty | ||
+ | *[http://www.zeitoun.net/articles/client-certificate-x509-authentication-behind-reverse-proxy/start Tricks to do client certificate authentications behind a reverse proxy] | ||
+ | |||
+ | ==Module API== | ||
+ | [https://modules.apache.org/ Apache Module API] | ||
+ | |||
+ | ==文档== | ||
+ | *[http://docs.huihoo.com/apache/httpd/2.2-cn/ Apache HTTP Server Version 2.2 中文文档] | ||
+ | *[http://docs.huihoo.com/apache/httpd/2.0-cn/ Apache HTTP Server Version 2.0 中文文档] | ||
+ | *[http://docs.huihoo.com/apache/apachecon/us2015/Begone-mod_php.pdf mod_proxy_fcgi + PHP-FPM,Begone mod_php! ] | ||
+ | *[http://docs.huihoo.com/rsaconference/usa-2015/spo3-w04-secure-apache-web-server-with-hmtl5-and-http-2.0.pdf Secure Apache Web Server with HMTL5 and HTTP 2.0] | ||
+ | *[http://docs.huihoo.com/apache/apachecon/us2013/27-Wednesday/A-Patchy-Web/Apache-HTTPD-2.4-The-Cloud-Killer-App.key Apache httpd v2.4: The Cloud Killer App] | ||
− | == | + | ==链接== |
− | *http://httpd.apache.org | + | *[http://httpd.apache.org 官网] |
− | * | + | *[http://wiki.apache.org/httpd/ Apache HTTP Server Wiki] |
− | + | [[category:apache]] | |
− | + | [[category:web server]] | |
+ | [[category:LAMP]] |
2022年3月19日 (六) 04:00的最后版本
您可以在Wikipedia上了解到此条目的英文信息 Apache HTTP Server Thanks, Wikipedia. |
Apache HTTP Server
目录 |
[编辑] 简介
Apache HTTP Server(也被称为Apache httpd)是Apache软件基金会的一个创建健壮的、工业级的、功能强大的、开放源代码的HTTP(Web)服务器的项目。欲知详情,请查看About Apache页面。
[编辑] 是什么?
- 一个强大的、灵活的、兼容HTTP/1.1规范的web服务器
- 实现了最新的协议,包括HTTP/1.1(RFC2616)
- 具有高度的可配置性和使用第三方模块的可扩展性
- 可以通过使用Apache模块API编写自己的模块进行定制
- 在非限制性许可证下提供所有的源代码
- 可以运行在 Windows 2003/XP/2000/NT/9x 、Netware 5.x 及以上版本、OS/2 、大多数Unix版本以及其它操作系统上
- 被非常活跃的进行开发
- 鼓励用户反馈新想法、bug报告、补丁程序
[编辑] 功能
[编辑] 项目
[编辑] 指南
- 在 Debian3.1 上安装 Apache 2 + PHP5 + MySQL5 debian3.1_apache2_php5_mysql5
- 在 Debian 上安装 Apache2 + MySQL5 + PHP5 + GD + Zlib + libpng + Jpeg v6b + FreeType2
- Install Apache2 On Debian with PHP,Python,Ruby,Perl,MySQL,PostgreSQL
- 在 WinXP 上安装 Apache 2 + PHP5 + MySQL5 winxp_apache2_php5_mysql5
- Red Hat Enterprise Linux install LAMP: 已经为你准备好安装包,只需选择安装: Apache,PHP,Python,Perl,SSL...
- WAMP (www.wampserver.com/en/index.php)
- XAMPP (www.apachefriends.org/en/xampp.html)
[编辑] 启用SSL
#apt-get install apache-ssl or /etc/apache2# a2enmod ssl /etc/apache2# apache2-ssl-certificate
creating selfsigned certificate replace it with one signed by a certification authority (CA)
enter your ServerName at the Common Name prompt
If you want your certificate to expire after x days call this programm with -days x Generating a 1024 bit RSA private key ...............................................................++++++ ....++++++ writing new private key to '/etc/apache2/ssl/apache.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [GB]: State or Province Name (full name) [Some-State]:GZ Locality Name (eg, city) []:SZ Organization Name (eg, company; recommended) []:huihoo Organizational Unit Name (eg, section) []:debian server name (eg. ssl.domain.tld; required!!!) []:demo.huihoo.com Email Address []:[email protected]
#/etc/apache2/sites-available/ cp default ssl_site 在/etc/apache2/ports.conf 中添加 Listen 443 修改/etc/apache2/sites-available/ssl_site, 将监听端口 改为 443 在配置文件中加入 SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem
<VirtualHost 192.168.1.22:443> ServerAdmin [email protected] ServerName www.mysite.com:443 DocumentRoot /var/www/mysite
# /etc/init.d/apache2 restart https://demo.huihoo.com:443/
[编辑] Modules
- mod_pagespeed
- mod_python
- mod_perl
- mod_ruby
- mod_fcgid
- mod_gcj
- mod_xml
- mod_mbox
- mod_pop3
- mod_arm4
- mod_smtpd
- mod_auth_mysql
- mod_vhost_mysql2
- mod_bt
- mod_video
- mod_spin
- mod_xmlrpc
- mod_uno
- mod_uid
- mod_rewrite
- mod_proxy
- mod_status
[编辑] 问题
503 Service Temporarily Unavailable 当每个IP超过最多设定的连接后就会有下面的提示:Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems.
解决方法: 将 MaxCoonPerIP 再弄大些。
<IfModule mod_limitipconn.c> <Location /debian> MaxConnPerIP 25 </Location> </IfModule>
[warn] _default_ VirtualHost overlap on port 80, the first has precedence
NameVirtualHost *:80 // 去掉注释
[编辑] Jetty
https http ---------> Apache -------> Jetty
[编辑] Module API
[编辑] 文档
- Apache HTTP Server Version 2.2 中文文档
- Apache HTTP Server Version 2.0 中文文档
- mod_proxy_fcgi + PHP-FPM,Begone mod_php!
- Secure Apache Web Server with HMTL5 and HTTP 2.0
- Apache httpd v2.4: The Cloud Killer App
[编辑] 链接
分享您的观点