0x00

apache2 默认监听端口是 80,如何修改?

0x01

修改 /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

# Listen 80

# 改成你要的端口
Listen 8888

# 下面是和 ssl 有关的
<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

通过注释发现还需要修改 /etc/apache2/sites-available/000-default.conf 文件,打开文件后把 <VirtualHost *:80> 中的 80 修改成 8888 即可

最后重启 apache2 服务

sudo systemctl restart apache2.service

访问试试吧

0x02

封面出处:http://simpledesktops.com/browse/desktops/2017/feb/28/geo-shapes/