Apache 配置 虚拟主机

<VirtualHost *:80>
    
    ServerName tongcheng.5q88.cn:80
    ServerAlias 
    DirectoryIndex index.html index.htm index.php 
    ErrorLog logs/tongcheng.5q88.cn-error.log
    CustomLog logs/tongcheng.5q88.cn-access_%Y%m%d.log comonvhost
    
    DocumentRoot "C:/www/kb"
    <Directory "C:/www/kb">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

照着上边赋值.就行 !!!

 

最简化配置如下(不设置域名,域名别名--):

listen 9000
<VirtualHost *:9000>
    
    DirectoryIndex index.html index.htm index.php 
    DocumentRoot "E:\project\php\lai-bang-bang\api\public"
    
    <Directory "E:\project\php\lai-bang-bang\api\public">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

 

posted on 2018-05-30 17:05  正义的伙伴!  阅读(177)  评论(0编辑  收藏  举报

导航

//增加一段JS脚本,为目录生成使用