li
  当前位置:主页 > 基础知识 > 文章内容
li
Apache的配置文件http.conf参数含义详解(4)
来源: www.ixdba.net  作者: IXDBA.NET官方    时间:2008-03-29   阅读:37  
本文章共7426字,分5页,当前第4页,快速翻页:
 

DocumentRoot /www/example1-80
ServerName www.example1.com
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
DocumentRoot /www/example1-8080
ServerName www.example1.com
</VirtualHost>

<VirtualHost 172.20.30.50:80>
DocumentRoot /www/example2-80
ServerName www.example1.org
</VirtualHost>

<VirtualHost 172.20.30.50:8080>
DocumentRoot /www/example2-8080
ServerName www.example2.org
</VirtualHost>

(3)单个IP地址的服务器上基于域名的虚拟主机配置:
# Ensure that Apache listens on port 80
Listen 80

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example1.com
ServerAlias example1.com. *.example1.com
# Other directives here
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example2.org
# Other directives here
</VirtualHost>

(4)
在多个IP地址的服务器上配置基于域名的虚拟主机:
Listen 80

# This is the "main" server running on 172.20.30.40
ServerName server.domain.com
DocumentRoot /www/mainserver

# This is the other address
NameVirtualHost 172.20.30.50

<VirtualHost 172.20.30.50>
DocumentRoot /www/example1
ServerName www.example1.com
# Other directives here ...
</VirtualHost>
IXDBA.NET社区论坛

<VirtualHost 172.20.30.50>
DocumentRoot /www/example2
ServerName www.example2.org
# Other directives here ...
</VirtualHost>

(5)
在不同的端口上运行不同的站点(基于多端口的服务器上配置基于域名的虚拟主机)
Listen 80
Listen 8080

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080

<VirtualHost 172.20.30.40:80>
ServerName www.example1.com
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName www.example1.com
DocumentRoot /www/domain-8080
</VirtualHost>

<VirtualHost 172.20.30.40:80>
ServerName www.example2.org
DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName www.example2.org
DocumentRoot /www/otherdomain-8080
</VirtualHost>

(6)
基于域名和基于IP的混合虚拟主机的配置:
Listen 80

NameVirtualHost 172.20.30.40

<VirtualHost 172.20.30.40>
DocumentRoot /www/example1
ServerName www.example1.com
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/example2
ServerName www.example2.org
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/example3
ServerName www.example3.net
</VirtualHost>



SSL
加密的配置

首先在配置之前先来了解一些基本概念:

证书的概念:首先要有一个根证书,然后用根证书来签发服务器证书和客户证书,一般理解:服务器证书和客户证书是平级关系。SSL必须安装服务器证书来认证。 因此:在此环境中,至少必须有三个证书:根证书,服务器证书,客户端证书。 在生成证书之前,一般会有一个私钥,同时用私钥生成证书请求,再利用证书服务器的根证来签发证书。

SSL
所使用的证书可以自己生成,也可以通过一个商业性


阅读更多内容<<上一页 · 1 · 2 · 3 · 4 · 5 · 下一页>>


  上一篇: apache配置文件httpd.conf参数详...   下一篇: HTTP协议中POST、GET、HEAD等参数...
li
 §相关评论  
 热点文章

·RewriteRule重写规则的语法:A
·apache配置文件httpd.conf参数
·Apache的配置文件http.conf参数
·HTTP协议中POST、GET、HEAD等参
·XAMPP命令之LAMPP
·Linux中安装XAMPP(LAMPP)服务器
·网页禁止右键、禁止复制等代码
·java.lang.OutOfMemoryError:
·Mysql数据库在Linux系统常用命
·mysql问答:MySQL数据库连接过多
·MySQL数据库中Show命令的用法
li
 编辑推荐
·RewriteRule重写规则的语法:A
·apache配置文件httpd.conf参数
·Apache的配置文件http.conf参数
·HTTP协议中POST、GET、HEAD等参
·XAMPP命令之LAMPP
·Linux中安装XAMPP(LAMPP)服务器
·网页禁止右键、禁止复制等代码
·java.lang.OutOfMemoryError:
·Mysql数据库在Linux系统常用命
·mysql问答:MySQL数据库连接过多
·MySQL数据库中Show命令的用法
li
 相关篇章
·apache配置文件httpd.conf参数详...
·RewriteRule重写规则的语法:Apa...
·Linux操作系统下的"umask"函数详...
·MySQL各存储引擎的区别及其启动方...
·MySQL在网络安全方面采取的主要措...
·在MySQL中执行SQL语句时的几个注...
·MySQL改善数据装载操作效率的策略
·设计高效合理的MySQL查询语句讲解
·MySQL用户Root密码为弱口令的攻击
·MySQL数据库接口的VC具体实现与应...
·HTTP协议中POST、GET、HEAD等参数...
·XAMPP命令之LAMPP
·Linux中安装XAMPP(LAMPP)服务器套...
·网页禁止右键、禁止复制等代码大...
·java.lang.OutOfMemoryError: al...
·Mysql数据库在Linux系统常用命令...
·mysql问答:MySQL数据库连接过多的...
·MySQL数据库中Show命令的用法
·MySQL导入导出工具mysqlimport用...
·mysql数据库源码安装详解
 
li
设为首页 | 关于我们 | 技术服务 | 收藏本站 | 网站地图 | 联系方式 | 本站友情连接