Files

66 lines
1.3 KiB
Markdown

进入编译环境
sh dev.sh
进入 nginx 目录
cd nginx-1.18.0
make clean
修改版编译参数
```
./configure \
--prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_auth_request_module \
--with-threads \
--with-openssl="/app/gmssl/gmssl" \
--with-cc-opt="-Iapp/gmssl/gmssl/include" \
--with-ld-opt="-lm" \
--with-stream \
--with-stream_ssl_module \
--with-debug
```
GMSSL 版本(不建议)
```
./configure --prefix=/usr/local/nginx \
--with-http_ssl_module \
--with-gmssl=./GmSSL/ \
--with-stream \
--with-stream_ssl_module \
--without-http_upstream_zone_module \
--without-stream_upstream_zone_module \
--with-http_auth_request_module \
--with-debug
```
GMSSL 版本(不建议)
```
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_auth_request_module --without-http_upstream_zone_module --with-gmssl=./GmSSL/ --with-debug
```
make
make install
容器内路径:/usr/local/nginx
容器外路径:/app/ssl/gateway.lib/target-nginx
进入 docker-image 目录,进行容器构建。
拷贝 nginx 文件为 gateway
test1.sh 测试
国密浏览器访问 8443 端口
打包
sh build.sh
docker tag gateway.lib gateway.lib:20251209
docker save gateway.lib:20251209 -o gateway.lib.20251209.tar