apache多站点vhost.conf配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#第1个站点的配置
<VirtualHost *:80>
    DocumentRoot "D:/phpStudy/WWW"
    ServerName localhost
    <Directory "D:/phpStudy/WWW">
            Options +Indexes +FollowSymLinks +ExecCGI
            Order Allow,Deny
            Allow from all
 
            DirectoryIndex index.php index.html
           
#           当前目录,允许“分布式”权限布置
            AllowOverride all
    </Directory>
</VirtualHost>
 
#第2个站点的配置
<VirtualHost *:80>
    ServerName  www.xuexi.com
#   设定该站点的域名,即通过以下域名访问
    ServerAlias map.xuexi.com  tv.xuexi.com
    DocumentRoot    "D:/phpStudy/WWW/xuexi/day1"
    <Directory "D:/phpStudy/WWW/xuexi/day1">
        Options +Indexes +FollowSymLinks +ExecCGI
        Order Allow,Deny
        Allow from all
 
        DirectoryIndex index.html index.php
       
        #当前目录,允许“分布式”权限布置
        AllowOverride all
    </Directory>
 
    #设置目录别名(虚拟目录)
    Alias  /zst  "D:/phpStudy/WWW/tp3.2.3"
    <Directory "D:/phpStudy/WWW/tp3.2.3">
        Options +Indexes +FollowSymLinks +ExecCGI
        Order Allow,Deny
        Allow from all
 
        DirectoryIndex index.html index.php
       
        #当前目录,允许“分布式”权限布置
        AllowOverride all
    </Directory>
     
</VirtualHost>
 
#第3个站点的配置
<VirtualHost *:80>
    DocumentRoot "D:/phpStudy/WWW/tp3.2.3"
    ServerName www.zstphp.com
    <Directory "D:/phpStudy/WWW/3.2.3">
            Options +Indexes +FollowSymLinks +ExecCGI
            Order Allow,Deny
            Allow from all
 
            DirectoryIndex index.php index.html
           
#           当前目录,允许“分布式”权限布置
            AllowOverride all
    </Directory>
</VirtualHost>

  

posted @   坏小子1993  阅读(2169)  评论(0编辑  收藏  举报
编辑推荐:
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
阅读排行:
· 手把手教你更优雅的享受 DeepSeek
· AI工具推荐:领先的开源 AI 代码助手——Continue
· 探秘Transformer系列之(2)---总体架构
· V-Control:一个基于 .NET MAUI 的开箱即用的UI组件库
· 乌龟冬眠箱湿度监控系统和AI辅助建议功能的实现
点击右上角即可分享
微信分享提示