1.安装Apache,了解里面的基础信息
目录 位置
#主配置目录 /etc/httpd/conf
#主配置文件 /etc/httpd/conf/httpd.conf
#子配置目录 /etc/httpd/conf.d/
#子配置文件 /etc/httpd/conf.d/*.conf
#默认发布目录 /var/www/html
#默认发布文件 index.html
#默认端口 80
#默认安全上下文 httpd_sys_content_t
#程序开启默认用户 apache
#apache 日志 /etc/httpd/logs/*
域名 = ip:端口号
systemctl restart httpd 重启httpd服务
修改httpd端口为9999
先 vim /etc/httpd/conf/httpd.conf
按i进入编辑模式,在底部输入 :/8080 查找listen端口 一般默认是80
在里面进行修改,并保存:wq
进行httpd重启服务
然后用netstat -antlupe|grep httpd查看端口情况