当我使用ErrorDocument时出现404 Not Found错误


0

我知道这个线程在网络上和这里已经被谈论很多了,我尝试了几乎所有方法,但是仍然遇到同样的问题。

我的conf文件:

<Proxy balancer://balancer-applitutoriel>
        BalancerMember http://localhost:8888 route=js1 retry=30 keepalive=on ttl=10 loadfactor=3 flushpackets=auto timeout=300

        Require all granted
</Proxy>

AliasMatch ^/myApp/static-([^/]+)/(.*)$ /var/www/html/myApp/static-$1/$2
ProxyPassMatch ^/myApp/static !
ProxyPass /myApp balancer://balancer-applitutoriel/myApp stickysession=NODESESSIONID nofailover=on

ProxyErrorOverride On
ErrorDocument 404 /custom_404.html

在文件夹中,/var/www/html我有这个:

myApp
│   └── static-1.0.0-20170512094719
│       ├── config-spa.json
│       ├── css
│       │   ├── auth.css
│       │   └── theme.css
│       ├── custom_404.html
└── index.html

自定义错误页面不起作用。所以我该怎么做 ?

Answers:


1

custom_404.html的目录错误。该/var/www/html配置必须在其中。您也可以将其保留在原处,但是之后
ErrorDocument 404 /myApp/static-1.0.0-20170512094719/custom_404.html


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.