From bfa7a24eafb3ae9e4df2783ca2b81fe484abdb1f Mon Sep 17 00:00:00 2001 From: Hakase Date: Wed, 9 May 2018 22:44:37 +0900 Subject: [PATCH] Rebuild server header --- README.md | 9 +++------ auto.sh | 33 ++++++++++++++++++++------------- src/core/nginx.h | 11 ++--------- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 53fbabc..b6c3138 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,17 @@ My nginx build files. -Please edit for this file. - https://git.hakase.app/Hakase/nginx-build/src/branch/master/src/core/nginx.h#L23 - -```c -#define NGINX_SERVER "hakase" -``` +Please edit for auto.sh file. (SERVER_HEADER, PAGESPEED) Features - Auto SSL Cipher settings + - ssl_protocols - ssl_ciphers - ssl_prefer_server_ciphers - ssl_ecdh_curve - DO NOT USE ssl_dhparam. not required. - TLS v1.3 (draft-23) - - Use OpenSSL-1.1.1-pre2 + - Use OpenSSL-1.1.1-pre3 (draft 23) - Prefers ChaCha20 suites with clients that don't have AES-NI (e.g., Android devices) - More library! - headers_more_nginx_module diff --git a/auto.sh b/auto.sh index 80690e3..b071f17 100755 --- a/auto.sh +++ b/auto.sh @@ -1,17 +1,12 @@ #!/bin/sh ### Please install library. -### jemalloc-devel libuuid-devel libatomic expat-devel unzip autoconf , the other... +### CentOS / Red Hat - yum install jemalloc-devel libuuid-devel libatomic expat-devel unzip autoconf automake libtool +### Ubuntu / Debian - apt install libjemalloc-dev uuid-dev libatomic1 libatomic-ops-dev expat unzip autoconf automake libtool -### Remove Old file -rm -f /usr/sbin/nginx.old - -### PageSpeed -### If you do not want to build PageSpeed, please enter a value other than "y". -PAGESPEED="y" - -### Multithread build -BUILD_MTS="-j$(expr $(nproc) \+ 1)" +### SERVER HEADER!!! +### Please edit this +SERVER_HEADER="hakase" ### x86, x64 check ### If you do not want optimization, uncomment it. @@ -19,6 +14,16 @@ BUILD_MTS="-j$(expr $(nproc) \+ 1)" BITCHK=`getconf LONG_BIT` #BITCHK="32" +### PageSpeed +### If you do not want to build PageSpeed, please enter a value other than "y". +PAGESPEED="y" + +### Remove Old file +rm -f /usr/sbin/nginx.old + +### Multithread build +BUILD_MTS="-j$(expr $(nproc) \+ 1)" + git submodule update --init --recursive ### PCRE reconf @@ -137,20 +142,22 @@ auto/configure \ --add-module=./lib/ngx_brotli \ ${BUILD_PAGESPEED} \ --add-module=./lib/ngx-fancyindex \ +--add-module=./lib/nginx-rtmp-module \ --add-module=./lib/naxsi/naxsi_src \ --add-module=./lib/nginx-dav-ext-module \ --add-module=./lib/headers-more-nginx-module - ### Deprecated (maybe) Modules -#--add-module=./lib/nginx-rtmp-module - +### NO ### OpenSSL Skip ### Do not use it for the FIRST BUILD. #touch lib/openssl/.openssl/include/openssl/ssl.h +### SERVER HEADER CONFIG +NGX_AUTO_CONFIG_H="objs/ngx_auto_config.h";have="NGINX_SERVER";value="\"${SERVER_HEADER}\""; . auto/define + ### Install make $BUILD_MTS install diff --git a/src/core/nginx.h b/src/core/nginx.h index 1855003..81c1767 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -14,20 +14,13 @@ #define NGINX_VER "nginx/" NGINX_VERSION " by Hakase" #define NGINX_SERVER_FULL NGINX_SERVER "/" NGINX_VERSION #define NGINX_ORIG "nginx/" NGINX_VERSION -#define NGX_BUILD2 "GCC" - - -/* - * Edit this - */ -#define NGINX_SERVER "hakase" #ifdef NGX_BUILD -#define NGINX_SERVER_FULL_BUILD NGINX_SERVER_FULL " (" NGX_BUILD2 ")" +#define NGINX_SERVER_FULL_BUILD NGINX_SERVER_FULL " (" NGX_BUILD ")" #define NGINX_VER_BUILD NGINX_VER " (" NGX_BUILD ")" #else -#define NGINX_SERVER_FULL_BUILD NGINX_SERVER_FULL " (" NGX_BUILD2 ")" +#define NGINX_SERVER_FULL_BUILD NGINX_SERVER_FULL #define NGINX_VER_BUILD NGINX_VER #endif