0

I am trying to setup a custom 503 error page on my website. I am using this apache configuration.

# Exclude the Maintenance directory from being proxied
 ProxyPass /Maintenance !

# ProxyPass other requests to the backend server
ProxyPass / https://local*********:***/
ProxyPassReverse / https://local********:***/

# Set the custom error document for 503 errors
ErrorDocument 503 /Maintenance/index.html

The issue is that the custom page is not able to render its content properly. As the index.html page require images and css.

I am getting 503 error on other pages which require to generate images and css.

[Mon Apr 22 05:15:11.279807 2024] [proxy:error] [pid 3662468:tid 22997273540352] (111)Connection refused: AH00957: https: attempt to connect to**************** failed
[Mon Apr 22 05:15:11.279841 2024] [proxy_http:error] [pid 3662468:tid 22997273540352] ************ AH01114: HTTP: failed to make connection to backend: ************
[Mon Apr 22 05:15:12.881465 2024] [proxy:error] [pid 3662468:tid 22997271439104] (111)Connection refused: AH00957: https: attempt to connect to*************** failed
[Mon Apr 22 05:15:12.881502 2024] [proxy_http:error] [pid 3662468:tid************] AH01114: HTTP: failed to make connection to backend: **********[![enter image description here][1]][1]

enter image description here

10
  • 1
    Read the error log. There is a clear message what's wrong. Commented Apr 22 at 4:55
  • I am also adding some apache logs Commented Apr 22 at 5:16
  • 1
    All resources has to be local and inside the Maintenance folder. It seems you attempt to proxy content in case of a 503, and get connection refused.
    – vidarlo
    Commented Apr 22 at 6:48
  • I can assure you that all content is inside the Maintenance folder Commented Apr 22 at 6:54
  • 1
    your index page in /Maintenance is referring to files outside of the /Maintenance folder, which in this case could be failing due to the Proxy not being up due to Maintenance. I'd first trying copying the whole of the localhost/css folder into /Maintenance and setting the base tag to be under /Maintenance, with all calls for css being not absolute but relative.
    – Marcel
    Commented Apr 29 at 12:48

1 Answer 1

1
+50

It seems your paths are wrong in your html, the css's from /Maintenance/index.html are pointing to /css and not /Maintenance/css.

Your index page in /Maintenance is referring to files outside of the /Maintenance folder, which in this case could be failing due to the Proxy not being up due to Maintenance.

I'd first trying copying the whole of the localhost/css folder into /Maintenance and setting the base tag to be under /Maintenance, with all calls for css being not absolute but relative

I hope that helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .