apache-VirtualHost配置说明


    #文档的根目录
    DocumentRoot "D:\phpStudy\WWW\cq"
    #域名
    ServerName www.cq.com
    ServerAlias 
    #配置rewrite相关选项
  
      Options FollowSymLinks ExecCGI
	  #是否启用rewrite
      AllowOverride All 
      Order allow,deny
	  #是否显示列表 (在发布项目后一般是不启用,对于这个配置,针对DocumentRoot在apachede的默认文件夹外的目录生效。比如下面的例一 )
      Options +indexes 
      Allow from all
	  #拒绝所有的访问
      #Deny from all  
      Require all granted
  

例一:

    #DocumentRoot "D:\phpStudy\WWW\max"
    DocumentRoot "D:\php"
    ServerName www.hehe.com
    ServerAlias 
  
      Options FollowSymLinks ExecCGI
      #是否显示列表 (在发布项目后一般是不启用,对于这个配置,针对DocumentRoot在apachede的默认文件夹外的目录生效 )
      Options +indexes 
      AllowOverride All
      Order allow,deny
      Allow from all
      #Deny from all
      Require all granted
  


你可能感兴趣的:(apache)