Apache HTTP 服务器的虚拟主机设置

本文链接

 

安装 Apache HTTP 就略过了,安装完毕后,停止 Apache HTTP 服务,进入目录 /apache/conf 找到httpd.conf 文件,在文件尾继续添加如下内容,填写完毕后保存文件,重启 Apache HTTP 服务,测试效果。

 

###############################################################################################

NameVirtualHost 10.10.1.8:80
###############################################################################################

# 虚拟主机设置

######################################################

<VirtualHost 10.10.1.8:80>
    ServerAdmin
webmaster@alinehot9.net
    DocumentRoot "D:/Apache2.2/htdocs"
    ServerName
www.alinehot9.net
    # ServerAlias www.alinehot9.net
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" common
</VirtualHost>

 

<VirtualHost 10.10.1.8:80>
    ServerAdmin
webmaster@alinehot9.net
    DocumentRoot "D:/WebSite/php/ThinkSNS/ROOT"
    ServerName t1.alinehot9.net
    # ServerAlias t1.alinehot9.net
    ErrorLog D:/WebSite/php/ThinkSNS/error.log
    CustomLog D:/WebSite/php/ThinkSNS/access.log common
    #TransferLog D:/WebSite/php/ThinkSNS/accessT.log
</VirtualHost>

<VirtualHost 10.10.1.8:80>
    ServerAdmin
webmaster@alinehot9.net
    DocumentRoot "D:/WebSite/php/sharetronix/ROOT"
    ServerName t.alinehot9.net
    # ServerAlias t.alinehot9.net
    ErrorLog D:/WebSite/php/sharetronix/error.log
    CustomLog D:/WebSite/php/sharetronix/access.log common
    #TransferLog D:/WebSite/php/sharetronix/access.log
</VirtualHost>

######################################################

# 相应的目录权限设置

######################################################

 

<Directory "D:/Apache2.2/htdocs">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

 

<Directory "D:/WebSite/php/ThinkSNS/ROOT">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

 

<Directory "D:/WebSite/php/sharetronix/ROOT">
    Options Indexes FollowSymLinks MultiViews
    # Options Indexes MultiViews
    AllowOverride All
    Order Allow,Deny
    Allow From All   
</Directory>
###############################################################################################

.

QQ群:236201801,欢迎讨论

本文链接

.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值