Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: custom index.html 4xx.html 5xx.html in Apache APISIX #3251

Closed
moonming opened this issue Jan 12, 2021 · 10 comments · Fixed by #4164
Closed

request help: custom index.html 4xx.html 5xx.html in Apache APISIX #3251

moonming opened this issue Jan 12, 2021 · 10 comments · Fixed by #4164
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@moonming
Copy link
Member

moonming commented Jan 12, 2021

As discussed in mailinglist: https://lists.apache.org/thread.html/rbb88d707eeaf0dbcba4d73f1f741f3621f90e84785899c47479a8557%40%3Cdev.apisix.apache.org%3E

We decided to rewrite index.html 4xx.html and 5xx.html in Apache APISIX instead of openresty.

@moonming moonming added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 12, 2021
@moonming moonming pinned this issue Mar 15, 2021
@moonming
Copy link
Member Author

we can use error_page to fix it.
like

error_page 500 502 503 504 /apisix_error_handler;

@moonming moonming changed the title request help: custom index.html and 5xx.html in Apache APISIX request help: custom index.html 4xx.hml 5xx.html in Apache APISIX Mar 21, 2021
@moonming moonming changed the title request help: custom index.html 4xx.hml 5xx.html in Apache APISIX request help: custom index.html 4xx.html 5xx.html in Apache APISIX Mar 21, 2021
@starsz
Copy link
Contributor

starsz commented Mar 21, 2021

That sounds so cool. Please assign to me.

@juzhiyuan
Copy link
Member

juzhiyuan commented Mar 21, 2021

before doing this issue, could you please share your plan here? just to make sure we are on the same direction 😊

@starsz
Copy link
Contributor

starsz commented Mar 22, 2021

Directly point to apisix.apach.org is not very good.

I think we can do it as follow:

  1. Provide a static HTML that contains the apisix.apache.org
  2. Update the ngx_tpl to generate the apisix_error_handler like this:
error_page 500 502 503 504 @apisix_error_handler;

By the way, @juzhiyuan can you design a simple static html like this:
https://github.com/openresty/openresty/blob/master/html/50x.html

@tokers
Copy link
Contributor

tokers commented Mar 22, 2021

Directly point to apisix.apach.org is not very good.

I think we can do it as follow:

  1. Provide a static HTML that contains the apisix.apache.org
  2. Update the ngx_tpl to generate the apisix_error_handler like this:
error_page 500 502 503 504 @apisix_error_handler;

By the way, @juzhiyuan can you design a simple static html like this:
https://github.com/openresty/openresty/blob/master/html/50x.html

And don't forget to add test cases.

@juzhiyuan
Copy link
Member

image

🤔 Why not take the first step? just to introduce our first HTML.

starsz added a commit to starsz/apisix that referenced this issue Mar 23, 2021
@starsz starsz mentioned this issue Mar 23, 2021
4 tasks
@starsz
Copy link
Contributor

starsz commented Apr 1, 2021

Hi, while I am working on it.
I think there is something needs to be discussed.

Reference the openresty Error page.

<p>If you are the system administrator of this resource then you should check
the <a href="http://nginx.org/r/error_log">error log</a> for details.</p>

Which link should we add?

https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L135

Can this help people to check the error log?

@juzhiyuan
Copy link
Member

http://nginx.org/r/error_log looks good to me, waiting for others :)

@moonming
Copy link
Member Author

moonming commented Apr 1, 2021

http://nginx.org/r/error_log looks good to me, waiting for others :)

we should link to Apache APISIX for help, not nginx

@juzhiyuan
Copy link
Member

got it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants