国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Apache > 正文

Apache服務器搭建http網站入門教程

2024-08-27 18:23:52
字體:
來源:轉載
供稿:網友
準備工具
  一臺帶有Linux系統的主機,這里使用CentOS 7.1 64位系統
  一個備案過的域名,這里使用www.hellopage.cn
  一臺可以訪問網絡的pc,這里使用的Win7_pro_sp1
步驟
1、解析域名
  在域名管理控制臺添加對主機ip的解析,如下圖

2、Apache安裝  啟動CentOS系統,安裝httpd
  # yum install httpd
3、配置Apache環境
  # vim /etc/httpd/conf/httpd.conf
  添加如下代碼至文件末尾
  同時修改文件的以下部分,來修改默認的主目錄
  同時別忘了創建此目錄,否則會報錯
  # cd /var/www/html
  # mkdir hellopage
  最后重新啟動httpd
  # /bin/systemctl start httpd.service
4、測試
  1.打開瀏覽器,輸入www.hellopage.cn,若出現如下頁面,則建立成功
  Testing 123..
  This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page it means that this site is working properly. This server is powered by CentOS.
  2.在剛剛創建的/var/www/html/hellopage/下創建html
  # cd /var/www/html/hellopage/
  # touch index.html
  # vim index.html
  添加如下代碼
  <!DOCTYPE html>
  <html>
  <head>
  <title>God Sacred</title>
  </head>
  <body>
  <p>hello world!</p>
  </body>
  </html>
  3.重新登錄網站www.hellopage.cn
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 锡林浩特市| 北流市| 洪雅县| 南宫市| 蒲江县| 竹山县| 雅江县| 大悟县| 昭平县| 永川市| 加查县| 墨竹工卡县| 尉犁县| 晋城| 乌拉特前旗| 时尚| 建水县| 沙湾县| 中卫市| 福安市| 章丘市| 长子县| 玉溪市| 永嘉县| 宜黄县| 高台县| 哈尔滨市| 都江堰市| 安庆市| 长泰县| 铅山县| 莱阳市| 社旗县| 博爱县| 原阳县| 正阳县| 安多县| 包头市| 东乡县| 武胜县| 灵寿县|