Closed szhu25 closed 7 years ago
My Nginx Conf file.
user nginx; worker_processes 2;
error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid;
load_module "/usr/lib64/nginx/modules/nginx-ct-master/ngx_http_ssl_ct_module.c"; load_module "/usr/lib64/nginx/modules/nginx-ct-master/ngx_ssl_ct_module.c";
events { worker_connections 4096; multi_accept on; }
http { include /etc/nginx/mime.types; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
include /etc/nginx/sites-enabled/*.conf;
server_names_hash_bucket_size 64;
}
You need to compile nginx yourself to use the module (even if you use the dynamic module - nginx doesn't support out of tree builds of dynamic modules yet).
There should be plenty of guidance on how to do this on the Internet - e.g. https://www.vultr.com/docs/how-to-compile-nginx-from-source-on-centos-7 is the first one listed in Google for CentOS 7.
You'll need to add --add-module=/path/to/nginx-ct
or --add-dynamic-module=/path/to/nginx-ct
to the end of the ./configure
command during the build.
HI, i don't really understand how to i dynamically use this file.
Then this line occured when i try to start nginx.
Sep 02 15:59:03 las2 nginx[26339]: nginx: [emerg] dlopen() "/usr/lib64/nginx/modules/nginx-ct-master/ngx_http_ssl_ct_module.c" failed (/usr/lib64/nginx/modules/nginx-ct-master/ngx_http_ssl_ct_module.c: invalid ELF header) in /etc/nginx/nginx.conf:8
Did i do something wrong ?
Nginx version is 1.13.4 Openssl version is OpenSSL 1.1.0f 25 May 2017 Centos 7
Thanks.