Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Apache Web Services in RHEL 8

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

RHEL 8 how to build Apache Web services, in response to this problem, this article details the corresponding analysis and solutions, hoping to help more small partners who want to solve this problem find a simpler and easier way.

RHEL 8 Build Apache Web Services, please configure the yum source before building.

environment

Red Hat Enterprise Linux release 8.0

VMware Workstation Pro 14

Construction steps

[root@localhost ~]# yum install -y httpd[root@localhost ~]# systemctl start httpd[root@localhost ~]# iptables -F[root@localhost ~]# systemctl stop firewalld[root@localhost ~]# systemctl disable firewalldRemoved /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@localhost ~]# setenforce 0[root@localhost ~]# ifconfigens33: flags=4163 mtu 1500 inet 192.168.10.118 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::e09a:769b:83f0:8efa prefixlen 64 scopeid 0x20 ether 00:50:56:34:0d:74 txqueuelen 1000 (Ethernet) RX packets 1959 bytes 1690200 (1.6 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1245 bytes 120922 (118.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0virbr0: flags=4099 mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:9c:ef:c6 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Enter 192.168.10.118 in your browser to view Apache Web service status

Custom Home Page Content

[root@localhost ~]# echo "HELLO RHEL8" > /var/www/html/index.html[root@localhost ~]# systemctl restart httpd

Set up file sharing services

[root@localhost ~]# rm -rf /etc/httpd/conf.d/welcome.conf [root@localhost ~]# rm -rf /var/www/html/index.html[root@localhost ~]# touch /var/www/html/file{1.. 10}[root@localhost ~]# systemctl restart httpd

enable port forwarding

View host IP

Enter 192.168.0.7:118 in the browser to test the file sharing service status

Solve Chinese garbled code

[root@localhost ~]# touch /var/www/html/Hello Red Hat 8.txt[root@localhost ~]# systemctl restart httpd

solution

Add IndexOptions Charset= UTF-8 to the/etc/httpd/conf/httpd.conf configuration file

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf316 AddDefaultCharset UTF-8317 IndexOptions Charset=UTF-8[root@localhost ~]# systemctl restart httpd

About RHEL 8 how to build Apache Web service questions to share here, I hope the above content can have some help for everyone, if you still have a lot of doubts not solved, you can pay attention to the industry information channel to learn more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report