美文网首页
ubuntu16修改apache2的端口

ubuntu16修改apache2的端口

作者: 天草二十六_简村人 | 来源:发表于2019-07-11 09:46 被阅读0次

一、背景
apache默认端口为80/443,在我们引进nginx的时候,会与nginx的端口冲突。

二、问题
修改apache的端口为8091/444,nginx端口保持不变。

三、解决步骤
1、修改/etc/apache2/ports.conf

root@ubuntu:/opt# cd /etc/apache2/
root@ubuntu:/etc/apache2# pwd
/etc/apache2
root@ubuntu:/etc/apache2# vi ports.conf
image.png

2、修改vi /etc/apache2/sites-enabled/000-default.conf的端口也为8091


image.png

3、重启apache
service apache2 restart

相关文章

网友评论

      本文标题:ubuntu16修改apache2的端口

      本文链接:https://www.haomeiwen.com/subject/gptrkctx.html