欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

一个ok的httpd.conf 部分的虚拟主机部分的设置 有大用

httpd.conf 中含有下面的多行
Listen 88
............
ServerName localhost:88

DocumentRoot  "D:\WWW"
<Directory />
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
</Directory>



httpd.conf 中包含一个 vhosts.conf 文件
即  
Include conf/vhosts.conf

vhosts.conf 的内容如下


<VirtualHost _default_:88>

    ServerName my.wzdlyunying.shi
    ServerAlias my.wzdlyunying.shi
    DocumentRoot "D:\xampputf8\htdocs\wzdlyunying"
    #ErrorLog logs/error_log
    #CustomLog logs/access_log combined
    <Directory "D:\xampputf8/htdocs\wzdlyunying">
        Options All
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
 
<VirtualHost _default_:88>
ServerName localhost
DocumentRoot "D:\WWW"
  <Directory "D:\WWW">
    Options -Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
  </Directory>
</VirtualHost>
 
普通分类: