Nginx는 파일 서버 파일 이름이 불완전하게 표시되는 문제를 해결합니다.

Nginx는 Http 파일 서버를 구축 할 수 있지만 구축된 프레지던트 파일의 기본 이름은 다음과 같이 불완전합니다.

문제: 显示不全,出现..., 해결해야 함
여기에 이미지 설명 삽입
다음은 nginx를 다시 컴파일하는 방법입니다. 이 문서를 참조하십시오
.

http://forum.nginx.org/read.php?2,124400,167420#msg-167420
January 18, 2011 08:36PM
fagtron
I looked all over the net and wasn't able to find this answer anyway, 
so I looked into the nginx source files and it's very easy.

Simply modify the file located at [b]src/http/modules/ngx_http_autoindex_module.c[/b] and then compile.

Change these lines:

[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50

#define NGX_HTTP_AUTOINDEX_NAME_LEN 50[/b]

to whatever you want, such as:

[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100

#define NGX_HTTP_AUTOINDEX_NAME_LEN 100[/b]

And then compile and restart nginx. That's it !!!

1. 최신 nginx-1.24.0.tar.gz를 다운로드하고 소스 코드를 수정합니다.

소스 src/http/modules/ngx_http_autoindex_module.c코드

#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50

로 변경

#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100
#define NGX_HTTP_AUTOINDEX_NAME_LEN 100

2. 재컴파일 및 설치

cd /usr/local/nginx-1.24.0/
./configure --prefix=/usr/local/nginx  --with-stream --with-http_ssl_module --with-stream_ssl_preread_module --with-stream_ssl_module
make
make install

소스 코드 설치는 Centos7 소스 코드 설치 Nginx1.20 및 직접 바이너리 마이그레이션 배포를 참조하십시오.

3. 재시험, 문제 해결

여기에 이미지 설명 삽입

추천

출처blog.csdn.net/jxlhljh/article/details/132028456