一、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 

天翼云apche、FTP、防火墙配置、php安装、mysql安装

开启和停止依然是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

远端测试访问页面即可

 

相关文章:

  • 2021-10-27
  • 2022-12-23
  • 2021-11-18
  • 2021-06-27
  • 2021-12-23
  • 2021-12-08
  • 2022-02-08
  • 2021-11-20
猜你喜欢
  • 2021-09-21
  • 2021-12-15
  • 2021-08-25
  • 2021-08-08
  • 2022-02-20
  • 2021-12-18
相关资源
相似解决方案