WebGateway系列(2): 配置Apache连接IRIS

本文档详细介绍了如何在Linux环境下配置Apache连接到IRIS,包括检查Apache工作状态、关闭SELinux、配置防火墙、Apache调优、安装Web Gateway、配置CSP Gateway到IRIS的连接并测试,以及访问IRIS上的Web应用程序。整个过程涉及到Apache的配置文件修改、Web Gateway的安装和CSP Gateway的安全设置等关键步骤。
摘要由CSDN通过智能技术生成

检查Apache工作状态

确认Apache正常工作, apache的版本已经安装路径。

[root@centos7 ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Apr 24 2019 13:45:48
[root@centos7 ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
  Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Active: active (running) since Mon 2020-06-15 16:46:36 CST; 5min ago
    Docs: man:httpd(8)
          man:apachectl(8)
Main PID: 6506 (httpd)
  Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
    Tasks: 272
  Memory: 31.3M
  CGroup: /system.slice/httpd.service
          ├─6506 /usr/sbin/httpd -DFOREGROUND
          ├─6592 /usr/sbin/httpd -DFOREGROUND
          ├─6607 /usr/sbin/httpd -DFOREGROUND
          ├─6608 /usr/sbin/httpd -DFOREGROUND
          ├─6609 /usr/sbin/httpd -DFOREGROUND
          ├─6610 /usr/sbin/httpd -DFOREGROUND
          ├─6611 /usr/sbin/httpd -DFOREGROUND
          ├─6612 /usr/sbin/httpd -DFOREGROUND
          ├─6613 /usr/sbin/httpd -DFOREGROUND
          ├─6622 /usr/sbin/httpd -DFOREGROUND
          ├─6623 /usr/sbin/httpd -DFOREGROUND
          └─6633 /usr/sbin/httpd -DFOREGROUND

Jun 15 16:46:36 centos7 systemd[1]: Starting The Apache HTTP Server...
Jun 15 16:46:36 centos7 systemd[1]: Started The Apache HTTP Server.
[root@centos7 ~]#

确认httpd.conf的位置。 在CentOS7中此位置为/etc/httpd/conf, 其他linux系统可能有其他位置, 如果不确认,可以使用 find命令寻找.

[root@centos7 ~]# ll /etc/httpd/conf
total 56
-rw-r--r-- 1 root root   890 Jun 26  2019 healthshare.conf
-rw-r--r-- 1 root root     0 Jun 26  2019 healthshare.conf_save
-rw-r--r-- 1 root root 11786 Jun 30  2019 httpd.conf
-rw-r--r-- 1 root root 11753 Jun 26  2019 httpd.conf.bak
-rw-r--r-- 1 root root 11746 Jun 30  2019 httpd.conf2
-rw-r--r-- 1 root root 13077 Apr 24  2019 magic
[root@centos7 ~]#

从Caché所在服务器用浏览器检查Apache测试页面可以访问。如果在Apache本地服务器访问, 网址为127.0.0.1(如果远端无法访问,请首先检查防火墙,后面步骤中有介绍)

picture testing123

关闭SELinux配置

查询确认SELinux状态为disabled

[root@centos7 ~]# getenforce
Disabled

如果非disabled状态,需要修改配置文件实现, 下图为修改后的文件内容,修改后重启电脑生效。

[root@centos7 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@centos7 ~]#

检查防火墙

确认apache所在服务器的防火墙打开了80端口。(为简化步骤, 这里不讨论Web Server的SSL接入)

[root@centos7 ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: active (running) since Mon 2020-06-15 17:24:15 CST; 2s ago
    Docs: man:firewalld(1)
Main PID: 27433 (firewalld)
    Tasks: 2
  Memory: 25.1M
  CGroup: /system.slice/firewalld.service
          └─27433 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Jun 15 17:24:15 centos7 systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 15 17:24:15 centos7 systemd[1]: Started firewalld - dynamic firewall daem
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值