一、apache
1、apache安装及配置
yum install httpd -y
2、配置开机启动
systemctl start httpd
systemctl enable httpd
3、查看启动状态
systemctl status httpd
二、ftp 安装
centos如果开启了ssh2,不需要特殊安装,直接可访问
三、外网允许访问(适用apache2.4版本)
<Directory />
AllowOverride none
Require all granted
</Directory>
<Directory "C:/xampp/htdocs">
Options FollowSymLinks
AllowOverride All
Allow from all
Require all granted
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
<Files "zentao.php">
SetHandler application/x-httpd-php
</Files>
<Files "zentaopro.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
同时修改访问端口,listen
重启服务
四、在防火墙上设置
查看防火墙状态
systemctl status firewalld.service
开启和停止依然是start和stop
增加可访问端口
开启端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
查看端口是否开启
firewall-cmd --query-port=80/tcp
重启防火墙
firewall-cmd --reload
查询哪些端口开启
firewall-cmd --list-port
五,在天翼云安全组内增加端口
入方向和出方向均添加次端口策略
六、测试apache是否启动
本地测试 curl http://127.0.0.1:8081
远端测试访问页面即可