megnlingling 发表于 2015-8-22 11:47:39

wamp配置虚拟域名

  1、打开apache下httpd.conf
  我的目录是在F:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
  2、去掉这两行前面的#注释
  LoadModule rewrite_module modules/mod_rewrite.so
  Include conf/extra/httpd-vhosts.conf
  这两个注释
  3、配置httpd-vhosts.conf
  <VirtualHost *:80>
  ServerName i.fx-dev.com //配置域名
  DocumentRoot "F:\root" //配置运行目录
  #RewriteEngine on //需要时配置重写
  #RewriteCond $1 !^(index\.php|aaa)
    #RewriteRule ^(.*)$ /test/test.php/$1
  <Directory "F:\root"> //目录的权限一定要配置
    AllowOverride all
    Order Deny,Allow
    Allow from all
  </Directory>
</VirtualHost>
  4、配置hosts
  127.0.0.1 i.fx-dev.com
  5、重启wamp
页: [1]
查看完整版本: wamp配置虚拟域名