Linux中修改HTTP默认主页
生活随笔
收集整理的這篇文章主要介紹了
Linux中修改HTTP默认主页
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
例題:創建新的默認頁面sorry.html,在默認主頁不能訪問的情況下顯示“很抱謙...該網站正在維護在 4月1號之后再訪問,感謝您的支持。
做題思路:
| 1.在html下新建文件sorry.html |
| 2.在sorry.html中編寫html語句 |
| 3.在httpd中的默認頁面中添加sorry.html |
在html下新建文件sorry.html(touch sorry.html )?
在sorry.html中編寫html語句
在httpd中的默認頁面中添加sorry.html(注意是在index.html后面,順序具有優先級)
vim /etc/httpd/conf/httpd.conf
| # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module> ? ? DirectoryIndex index.html sorry.html </IfModule> |
?
重啟httpd服務
總結
以上是生活随笔為你收集整理的Linux中修改HTTP默认主页的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一年中重要的节日列表 用日历便签分别记录
- 下一篇: HP SureStore 磁带机 - 在