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>

猜你喜欢

转载自blog.csdn.net/Dafei4/article/details/80229531
今日推荐