1、打开bin/apache/apache2.4.37/conf/httpd.conf,找到 “Include conf/extra/httpd-vhosts.conf“ ,删掉#号
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
2、 打开bin/apache/apache2.4.37/conf/extra/httpd-vhosts.conf,添加如下代码
Listen 10 # 监听10端口
<VirtualHost *:10>
ServerName localhost:10
ServerAlias localhost:10
DocumentRoot "${INSTALL_DIR}/www/CElementClient"
<Directory "${INSTALL_DIR}/www/CElementClient">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
也可以在httpd.conf文件添加 Listen [::0]:10
Listen 0.0.0.0:10 #监听10端口