修改/etc/apache2目录下的配置文件ports.conf:
![01470f99a7f5e0618ffc44e1f263d980.png](https://img-blog.csdnimg.cn/img_convert/01470f99a7f5e0618ffc44e1f263d980.png)
把Listen 80改成Listen 9015:
![390bad80c2c15db3d3c3363faf568026.png](https://img-blog.csdnimg.cn/img_convert/390bad80c2c15db3d3c3363faf568026.png)
相同目录下的apache2.conf,文件内有自描述的注释,该文件是apache配置文件的入口:
![e32573ad5a703744f9412e07afcc886f.png](https://img-blog.csdnimg.cn/img_convert/e32573ad5a703744f9412e07afcc886f.png)
修改完配置文件后,使用service apacehe2 restart 或/etc/init.d/apache2 restart重启服务器:
![f157f26dc00f3dbdcf612deef030255c.png](https://img-blog.csdnimg.cn/img_convert/f157f26dc00f3dbdcf612deef030255c.png)
运行时效果:9015端口生效了
![9b02102ca458db8208c9f5bb3c4c6c12.png](https://img-blog.csdnimg.cn/img_convert/9b02102ca458db8208c9f5bb3c4c6c12.png)
修改/etc/apache2目录下的配置文件ports.conf:
把Listen 80改成Listen 9015:
相同目录下的apache2.conf,文件内有自描述的注释,该文件是apache配置文件的入口:
修改完配置文件后,使用service apacehe2 restart 或/etc/init.d/apache2 restart重启服务器:
运行时效果:9015端口生效了