apache-VirtualHost配置说明

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

然后在hosts文件中添加

    127.0.0.1       www.123.com

就ok

猜你喜欢

转载自blog.csdn.net/liu709127859/article/details/81166994
今日推荐