1.打开apache/conf/httpd.conf文件加入listen 8080(监听的端口号)
然后加入
# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"
然后加入
DocumentRoot "E:htdocs/"
<Directory "E:htdocs/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
注:文件地址是上面的文件地址,记住是两个地址
2.打开apacheconfextra目录下的httpd-vhosts.conf文件
加入
<virtualhost *:8080>
ServerName localhost
DocumentRoot "E:project_ICSourceICS"
</virtualhost>
注:更改地址就好了
完成!