Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8174067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:21:23+00:00 2026-06-06T22:21:23+00:00

i custom varnish 500 error page,but i found that it could not display chinese

  • 0

i custom varnish 500 error page,but i found that it could not display chinese characters,

i tried deliver an error page from a static file, but it is not working
User-friendly error pages from Varnish

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:21:24+00:00Added an answer on June 6, 2026 at 10:21 pm

    below is the full part of Related in varnish.vcf

    C{
      #include <stdio.h>
      #include <stddef.h>
      #include <stdlib.h>
    }C
    sub vcl_error {
    
    set obj.http.Content-Type = "text/html; charset=utf-8";
    set obj.http.Retry-After = "5";
    if ((obj.status == 500 || obj.status == 503)&&client.ip !~ flnet){
       C{
         FILE    *infile;
         char    *buffer;
         char fname [50];
         long    numbytes;
    
            sprintf(fname, "/var/www/html/%d.html", VRT_r_obj_status(sp));
         infile = fopen(fname, "r");
          if(infile == NULL)
             return 1;
    
           fseek(infile, 0L, SEEK_END);
           numbytes = ftell(infile);
           fseek(infile, 0L, SEEK_SET);
           buffer = (char*)calloc(numbytes, sizeof(char));
           fread(buffer, sizeof(char), numbytes, infile);
           fclose(infile);
           VRT_synth_page(sp, 0, buffer, "<!-- XID: ", VRT_r_req_xid(sp), " -->", vrt_magic_string_end);
    
           free(buffer);
         return 0;
        }C
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Custom Adapter that extends SimpleCursorAdapter for my ListFragment does not display the items
Embedded custom-tag in dynamic content (nested tag) not rendering. I have a page that
My custom view does not display entirely. Please see my screenshot: And the source
A custom AnnotationView is updated with new coordinates. But the problem is that it
A custom control inside my Masterpage , Does that can access the main page?
Custom map is broken on satellite view, does not show satellite imagery. Any ideas,
My custom error messages quit working somewhere along the way and I'm getting this
Defining custom components in Facelets is easy and quick but there's one thing I
My custom controls are not loading in VS.NET's designer because of a null reference
I'm currently working on a Varnish (v3) set up, but I was wondering if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.