日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
自定義ApacheWeb首頁內(nèi)容實(shí)現(xiàn)方法

如何自定義Apache Web首頁內(nèi)容?這個(gè)問題相當(dāng)簡單,編寫index.html文件即可實(shí)現(xiàn)自定義內(nèi)容,下面一起來看一下具體實(shí)現(xiàn)方法。

我們提供的服務(wù)有:做網(wǎng)站、網(wǎng)站制作、微信公眾號開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、向陽ssl等。為上千企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的向陽網(wǎng)站制作公司

1. 安裝Apache

[root@localhost ~]# yum install -y httpd

2. 修改/etc/httpd/conf/httpd.conf配置文件

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf
在 vim 中,快速定位到 第 95行
命令模式下 輸入 :95
修改為以下形式。記得去掉 # 號

ServerName 192.168.XX.XX:80

: wq 保存退出

3. 啟動(dòng)web服務(wù)

[root@localhost ~]# systemctl start httpd
[root@localhost ~]# netstat -ntl #確認(rèn)80端口已啟用
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN

4. 檢查Apache Web服務(wù)是否正常

[root@localhost ~]# cd /var/www/html/
[root@localhost html]# ls
[root@localhost html]# iptables -F
[root@localhost html]# ifconfig
ens32: flags=4163
  
    mtu 1500 inet 192.168.10.11 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::20c:29ff:feda:182e prefixlen 64 scopeid 0x20 ether 00:0c:29:da:18:2e txqueuelen 1000 (Ethernet) RX packets 930 bytes 77097 (75.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 575 bytes 77429 (75.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73
   
     mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1 (Local Loopback) RX packets 88 bytes 7484 (7.3 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 88 bytes 7484 (7.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 
   
  

在瀏覽器輸入192.168.10.11,出現(xiàn)以下界面,說明Apache Web服務(wù)正常。

5. 自定義首頁文件

[root@localhost html]# pwd
/var/www/html
[root@localhost html]# vim index.html

[root@localhost html]# systemctl restart httpd

在瀏覽器輸入192.168.10.11,出現(xiàn)以下界面,說明自定義首頁文件生效。

自定義Apache Web服務(wù)的首頁內(nèi)容自定義Apache Web服務(wù)的首頁內(nèi)容


本文標(biāo)題:自定義ApacheWeb首頁內(nèi)容實(shí)現(xiàn)方法
文章網(wǎng)址:http://www.dlmjj.cn/article/cccpgdp.html