Apache HTTP Server

来自开放百科 - 灰狐
跳转到: 导航, 搜索
Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Apache HTTP Server Thanks, Wikipedia.

Apache HTTP Server(也被称为Apache httpd)是Apache软件基金会的一个创建健壮的、工业级的、功能强大的、开放源代码的HTTP(Web)服务器的项目。欲知详情,请查看About Apache页面。

目录

什么是 Apache HTTP Server

  • 一个强大的、灵活的、兼容HTTP/1.1规范的web服务器
  • 实现了最新的协议,包括HTTP/1.1(RFC2616)
  • 具有高度的可配置性和使用第三方模块的可扩展性
  • 可以通过使用Apache模块API编写自己的模块进行定制
  • 在非限制性许可证下提供所有的源代码
  • 可以运行在 Windows 2003/XP/2000/NT/9x 、Netware 5.x 及以上版本、OS/2 、大多数Unix版本以及其它操作系统上
  • 被非常活跃的进行开发
  • 鼓励用户反馈新想法、bug报告、补丁程序

Modules

相关链接

安装指南

点击 LAMP Install on Debian

启用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/

错误处理

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 Module API

文档

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱