成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

RHEL8如何搭建ApacheWeb服務(wù)

RHEL 8如何搭建 Apache Web 服務(wù),針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。

成都創(chuàng)新互聯(lián)公司是一家專業(yè)提供疏附企業(yè)網(wǎng)站建設(shè),專注與成都網(wǎng)站建設(shè)、成都網(wǎng)站制作、HTML5建站、小程序制作等業(yè)務(wù)。10年已為疏附眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)的建站公司優(yōu)惠進(jìn)行中。

RHEL 8 搭建 Apache Web 服務(wù),搭建前請(qǐng)把 yum 源配好。

環(huán)境

Red Hat Enterprise  Linux release 8.0
VMware Workstation Pro 14

搭建步驟

[root@localhost ~]# yum install -y httpd
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# iptables -F
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# setenforce 0
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  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 0
lo: flags=73<UP,LOOPBACK,RUNNING>  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 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST>  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

在瀏覽器輸入 192.168.10.118 查看 Apache Web 服務(wù)狀態(tài)

RHEL 8如何搭建 Apache Web 服務(wù)

自定義首頁(yè)內(nèi)容

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

RHEL 8如何搭建 Apache Web 服務(wù)

設(shè)置文件共享服務(wù)

[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

RHEL 8如何搭建 Apache Web 服務(wù)

設(shè)置端口映射

RHEL 8如何搭建 Apache Web 服務(wù)

查看宿主機(jī)IP

RHEL 8如何搭建 Apache Web 服務(wù)

在瀏覽器輸入 192.168.0.7:118 測(cè)試文件共享服務(wù)狀態(tài)

RHEL 8如何搭建 Apache Web 服務(wù)

解決中文亂碼

[root@localhost ~]# touch /var/www/html/你好紅帽8.txt
[root@localhost ~]# systemctl restart httpd

RHEL 8如何搭建 Apache Web 服務(wù)

解決方法
在 /etc/httpd/conf/httpd.conf 配置文件中加入 IndexOptions Charset=UTF-8

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

RHEL 8如何搭建 Apache Web 服務(wù)

關(guān)于RHEL 8如何搭建 Apache Web 服務(wù)問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。

當(dāng)前文章:RHEL8如何搭建ApacheWeb服務(wù)
文章源于:http://jinyejixie.com/article16/pgiddg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站Google、響應(yīng)式網(wǎng)站、云服務(wù)器、手機(jī)網(wǎng)站建設(shè)、微信公眾號(hào)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站制作
麻城市| 贵港市| 松桃| 万年县| 吴堡县| 长子县| 湄潭县| 板桥市| 定州市| 旌德县| 济宁市| 莲花县| 农安县| 泗阳县| 垣曲县| 福海县| 革吉县| 新化县| 沙坪坝区| 石棉县| 北海市| 镇江市| 抚宁县| 息烽县| 和林格尔县| 准格尔旗| 和龙市| 墨竹工卡县| 洪雅县| 河东区| 安吉县| 新蔡县| 淳化县| 彰化市| 凤城市| 光泽县| 商丘市| 微山县| 珲春市| 梅州市| 慈溪市|