<VirtualHost *:80>
ServerName www.eurocup.com
DocumentRoot " D:/Workspace/Eurocup"
<Directory " D:/Workspace/Eurocup">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php index.html index.htm
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
ServerName www.eurocup.com
DocumentRoot " D:/Workspace/Eurocup"
<Directory " D:/Workspace/Eurocup">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php index.html index.htm
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
如上图,红色是代表自己的站点域名,在hosts文件中需要将这个域名映射到本机,
这是找本机Hosts文件的方法
添加上本行即可
重启apache服务器即可,(注意,本服务器使用的是阿帕奇2.4版本的)