zoukankan      html  css  js  c++  java
  • windows下面 apache 虚拟主机配置

    <VirtualHost 192.168.0.20:81>
        ServerAdmin www.test2.com
        DocumentRoot "D:/PHP/Apache/htdocs/testSite2"
        <Directory "D:/PHP/Apache/htdocs/testSite2">
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
        </Directory>   
    </VirtualHost>
    这样我们就可以用192.168.0.20:81访问testsite2了。 如果想在internet访问IP地址必须是静态的

     详细设置代码

    <VirtualHost *:80>
        ServerName  global_csi.local
        DocumentRoot "E:/wamp/www/global_csi/www"
        ErrorLog "E:/wamp/logs/global_csi-error.log"
        CustomLog "E:/wamp/logs/global_csi-access.log" common
      <Directory "E:/wamp/www/global_csi_20/www">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        </Directory>  

    </VirtualHost>

    上述情况还可能报错,you have no permi to acess !
    还需要在allow from all前面加入

    ##############VirtualHost*#主机监听端口默认是是83#############

    Alias /www  "D:/www"
    <Directory "D:/www">
     Options Indexes MultiViews
     AllowOverride All 
     Order allow,deny
     Allow from all
     Require all granted
     DirectoryIndex default.php
    </Directory>

     
  • 相关阅读:
    Jenkins安装2
    11月14 vagrant 虚拟机连接
    11月13 ssh 和 netstat
    Jenkins安装
    11月12号 springboot1.5 引入redis
    11月12号 用户登录输入密码错误达到指定次数后,锁定账户 004
    js模式-观察者模式
    立即执行函数
    vue 获取数据
    在登陆退出时候使用Vuex
  • 原文地址:https://www.cnblogs.com/legend-song/p/3729477.html
Copyright © 2011-2022 走看看