nginx重新编译添加ssl模块
https://www.cnblogs.com/zhming26/p/6278667.html
?
https nginx配置
?
?
找到安裝nginx的源碼根目錄,如果沒有的話下載新的源碼
http://nginx.org
tar xvzf nginx-1.3.2.tar.gz
查看ngixn版本極其編譯參數
/usr/local/nginx/sbin/nginx -V
進入nginx源碼目錄
cd nginx-1.3.2
以下是重新編譯的代碼和模塊
./configure --prefix=/usr/local/nginx--with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module
make 千萬別make install,否則就覆蓋安裝了
make完之后在objs目錄下就多了個nginx,這個就是新版本的程序了
備份舊的nginx程序
cp /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak
把新的nginx程序覆蓋舊的
cp objs/nginx /usr/local/nginx/sbin/nginx
測試新的nginx程序是否正確
/usr/local/nginx/sbin/nginx -t
nginx: theconfiguration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx:configuration file /usr/local/nginx/conf/nginx.conf test issuccessful
平滑重啟nginx
/usr/local/nginx/sbin/nginx -s reload
查看ngixn版本極其編譯參數
/usr/local/nginx/sbin/nginx -V
這是我重新編譯的代碼:
./configure --prefix=/usr/local/nginx --with-google_perftools_module --user=www --group=www --with-http_stub_status_module --with-http_gzip_static_module --with-openssl=/usr/ --with-pcre=/mydata/soft/pcre-8.31
轉載于:https://www.cnblogs.com/chen-msg/p/8582374.html
總結
以上是生活随笔為你收集整理的nginx重新编译添加ssl模块的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python实现文件夹增量同步
- 下一篇: 模块初识