一.如何添加端口映射
先打开apache目录下conf文件夹下面的 httpd.conf文件,之后在这里面修改一些参数
apache默认的为80端口号,此时我们要添加多个端口,
图中所示的81,82,83,84便是我们所添加的端口号,80端口是Apache默认的,
之后我们在文件的最底部,添加如下代码,
NameVirtualHost *:82 // 是我们刚刚配置的端口号
<VirtualHost *:82> // 同理
ServerName localhost:82 // localhost是我们本地访问时的名字,也可将localhost换成本地IP的形式访问(127.0.0.1)的形式访问,localhost == 127.0.0.1
DocumentRoot “E:/Apache2.4.29/blogs” //这里为你项目的路径,一定要写对哦
<Directory “E:/Apache2.4.29/blogs”> //这里为你项目的路径,一定要写对哦,与上面相同
#
# 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 compli