安装Apache网站服务器
第一步:更新ubuntu服务器
:sudo apt-get update
第二步:安装Apache服务器
:sudo apt-get install apche2
第三步:修改默认端口
Apache2默认端口为80端口
查找apache2安装目录
:whereis apache2
切换至apache2安装目录
:cd etc/apache2
查看文件列表
:ls -l
编辑apache2.conf文件,修改端口号
:vi apache2.conf
修改listen 80为需要的端口号,此处改为2017
第四步:修改完成后,重启apache2服务
:service apache2 restart