Apache HTTP Server path does not support solutions for Chinese character problems

Source: Internet
Author: User

Today, I modified the Apache server's configuration httpd.conf Default Web directory, and changed it to my current published real site Directory. Then modify, save, restart the server, but at this point the server is prompted not to start: "The requested operation has failed!." Needless to say, it must be a certain parameter configuration is incorrect, and just now I just modified the server's DocumentRoot properties, before the configuration file was backed up.

After careful comparison, the original configuration file in the directory are all English characters, and at this time my Web site publishing directory has Chinese characters. The test found that the server could not be started as long as it contained Chinese in the root directory.

After deep thinking, I estimate that the problem with the character encoding format, the server read the directory string is not a true string. There seemed to be a voice at the distance telling me: You look at the encoding format of the httpd.conf file. Then with this sound in Notepad opened the configuration file, through the Save As dialog box to see is: ANSI. The root of the problem seems to have been found, so in the lower side of the Save As dialog box, "Encoding (E)" selects the generic UTF-8 and then points to "save."

Reboot the server at this point and everything is OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.