Apache 添加自定義vhost 目錄,等其他配置

1、在 Apache 下找到 httpd.conf  ,這個文件中找到默認 Include conf/vhosts.conf   ,

在這個之後添加 Include conf/self_vhosts/*.conf

我的配置: 

Include conf/vhosts.conf
Include conf/self_vhosts/*.conf


2、 Apache 添加 404 跳轉到首頁 在 vhost 文件中添加如下

主要代碼:  ErrorDocument 404 http://www.test.com

<VirtualHost *:80>
    DocumentRoot "E:/web/bj_tour_en/A206/"
    ServerName www.test.com
    ErrorDocument 404 http://www.test.com
</VirtualHost>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章