国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

[emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:35

這篇具有很好參考價(jià)值的文章主要介紹了[emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:35。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

這個(gè)錯誤提示表明在Nginx配置文件(通常是nginx.conf)中使用了SSL(Secure Sockets Layer)相關(guān)的配置,但是Nginx沒有加載相應(yīng)的SSL模塊。

1.檢查Nginx是否編譯了SSL模塊:

/usr/local/nginx/sbin/nginx -V 2>&1 | grep --color=auto ssl
/usr/local/nginx/sbin/nginx:安裝nginx的絕對路徑
輸出以下結(jié)果 則為安裝已加載SSL模塊:
configure arguments: --with-openssl=/XXX/openssl-1.1.1l --with-http_ssl_module
/XXX/openssl-1.1.1l:openssl安裝位置
有這個(gè)就是安裝了--with-http_ssl_module

2.如果已編譯安裝SSL模塊,配置有問題:

1.打開Nginx配置文件(通常是nginx.conf)。
2.確保在配置文件中的server塊中有正確的SSL配置,如listen 443 ssl;和證書路徑等,這個(gè)在證書配置的官網(wǎng)有具體的所需配置。
3.nginx.conf配置舉例:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    map $http_upgrade $connection_upgrade {
		default upgrade;
		''      close;
    }
    sendfile        on;
    keepalive_timeout  65;

    	server {
	     #HTTPS的默認(rèn)訪問端口443。
	     listen 443 ssl;
	     
	     #填寫證書綁定的域名
	     server_name XXX;
	 
	     #填寫證書文件名稱
	     ssl_certificate cert/XXX.pem;
     	 #填寫證書私鑰文件名稱
	     ssl_certificate_key cert/XXX.key;
	 
	     ssl_session_cache shared:SSL:1m;
	     ssl_session_timeout 5m;
		 
	     #自定義設(shè)置使用的TLS協(xié)議的類型以及加密套件(以下為配置示例,請您自行評估是否需要配置)
	     #TLS協(xié)議版本越高,HTTPS通信的安全性越高,但是相較于低版本TLS協(xié)議,高版本TLS協(xié)議對瀏覽器的兼容性較差。
	     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
	     ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
	
	     #表示優(yōu)先使用服務(wù)端加密套件。默認(rèn)開啟
	     ssl_prefer_server_ciphers on;
	     
	    location / {
           root   html/XXX;
           index  index.html index.htm;
            try_files $uri $uri/ /index.html; 
	    }
	    location /prod-api/{
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header REMOTE-HOST $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://XXX:XXX/;
        }
		
		location /prod-system/{
			proxy_pass http://XXX:XXX/;  #修改為需要被反向代理的WebSocket的IP和端口號
			proxy_http_version 1.1;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection $connection_upgrade;
       }
}

4.重新驗(yàn)證Nginx配置:
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
如果沒有語法錯誤,啟動Nginx

3.如果未編譯安裝SSL模塊(OpenSSL安裝):

# 進(jìn)入您希望存放 OpenSSL 源代碼的目錄
cd /XXX

# 下載 OpenSSL 源代碼,瀏覽器也能訪問
https://www.openssl.org/source/openssl-1.1.1l.tar.gz

# 解壓 OpenSSL 源代碼
tar -zxvf openssl-x.x.x.tar.gz

make
make install

如果出現(xiàn)報(bào)錯:
Operating system: x86_64-whatever-linux2 You need Perl 5.
訪問:https://www.cpan.org/src/5.0/離線下載也可以

wget https://www.cpan.org/src/5.0/perl-5.30.1.tar.gz
tar -xzf perl-5.30.1.tar.gz
cd perl-5.30.1
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install

4.安裝成功OpenSSL后,進(jìn)入Nginx源代碼目錄,(解壓出來的那個(gè)地方,安裝一般都是在/usr/local/nginx)。

./configure --with-openssl=/usr/local/openssl --with-http_ssl_module
make
make install

驗(yàn)證配置
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
啟動:/usr/local/nginx/sbin目錄執(zhí)行./nginx
重新加載配置:/usr/local/nginx/sbin目錄執(zhí)行./nginx -s reload文章來源地址http://www.zghlxwxcb.cn/news/detail-840518.html

到了這里,關(guān)于[emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:35的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • nginx配置ssl的坑(TLSv1.3\ngx_http_ssl_module)

    查看openssl版本openssl version,一般騰訊云為1.0.2k版本。 到官網(wǎng) www.openssl.org 查看最新版本openssl,現(xiàn)在最新為1.1.1h版。 下載nginx 重新make下nginx,最后openssl配置上面升級后的 完成后執(zhí)行 make 命令,make失敗執(zhí)行 make clean后重新make 配置后的nginx.config 檢查配置 nginx -t 啟動nginx ./ngin

    2024年02月16日
    瀏覽(22)
  • Nginx啟動報(bào)錯,nginx: [emerg] SSL_CTX_use_PrivateKey_file(“/etc/infra/data/ngx/ssl/**.key“)

    Nginx啟動報(bào)錯 由于需求需要在nginx中添加ssl服務(wù),ssl服務(wù)證書在 GoDaddy 上購買的,購買后在網(wǎng)頁中獲得private key和csr兩個(gè)文件,然后在控制臺中ssl欄進(jìn)入下載證書,和 pem 文件內(nèi)容一致大大概就是證書,提交服務(wù)器,配置好nginx配置文件,進(jìn)行啟動,返回以上報(bào)錯。 將private k

    2024年02月13日
    瀏覽(20)
  • nginx配置https后報(bào)錯nginx: [emerg] https protocol requires SSL support in XXX.conf詳細(xì)解決方法

    最近,在測試環(huán)境的nginx里增加了一個(gè) https 配置: 然后,執(zhí)行命令: 結(jié)果,nginx就報(bào)錯了: 百度發(fā)現(xiàn),是之前安裝nginx時(shí)沒有安裝ssl模塊,需要重新安裝一個(gè)nginx。步驟如下: 1.下載好nginx安裝包,例如 nginx-1.17.2.tar.gz 2.查看下目前nginx使用的配置是什么: 發(fā)現(xiàn),確實(shí)沒有ss

    2023年04月08日
    瀏覽(20)
  • nginx啟動報(bào)錯:nginx: [emerg] https protocol requires SSL support in /usr/local/nginx/conf/ngi

    nginx: [emerg] https protocol requires SSL support in /usr/local/nginx/conf/nginx 這個(gè)錯誤是由于配置了https代理但是沒有安裝ssl模塊導(dǎo)致的,只需要按照以下步驟安裝ssl模塊 查看nginx配置,順便找到configure文件位置并切換到有這個(gè)文件的目錄下 修改configure,增加ssl模塊 編譯并安裝 重啟nginx即

    2024年02月11日
    瀏覽(47)
  • SSL modules require the OpenSSL library

    SSL modules require the OpenSSL library

    背景: 我在源碼安裝nginx的時(shí)候進(jìn)行 ./configure 構(gòu)建結(jié)果包錯,說需要OpenSSL library 1、在有網(wǎng)絡(luò)的情況下,在線安裝 2、在無網(wǎng)絡(luò)的情況下,下載openssl上傳到服務(wù)器,在編譯的時(shí)候指定路徑 Openssl 下載地址 這次下載使用openssl-1.0.2k版本 安裝完可以將openssl加入到環(huán)境變量 在ngi

    2024年02月15日
    瀏覽(18)
  • Nginx增加SSL證書時(shí)報(bào)錯:/configure: error: SSL modules require the OpenSSL library.

    Nginx增加SSL證書時(shí)報(bào)錯:/configure: error: SSL modules require the OpenSSL library.

    /configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl= option. 步驟1:先看下是否安裝OpenSSL依賴 注意:nginx不是全局的話需要到nginx的sbin里面執(zhí)行

    2024年02月05日
    瀏覽(22)
  • ./configure: error: the HTTP rewrite module requires the PCRE library.

    ./configure: error: the HTTP rewrite module requires the PCRE library. 這個(gè)錯誤提示告訴你,在運(yùn)行 configure 腳本時(shí)遇到了問題,原因是 HTTP rewrite 模塊需要 PCRE 庫的支持。 PCRE (Perl Compatible Regular Expressions) 是一種用來處理正則表達(dá)式的庫,它主要用于文本搜索和替換。 要解決這個(gè)問題,你需

    2024年01月23日
    瀏覽(22)
  • ./configure: error: SSL modules require the OpenSSL library. You can either do not enable the module

    ?Ubuntu22系統(tǒng),參考nginx文檔Support for QUIC and HTTP/3?執(zhí)行如下命令: 時(shí)報(bào)錯如下: 但其實(shí)系統(tǒng)是有openssl庫的: ? ?out git:(v1.1.0) ? openssl version OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) 必應(yīng)了一下,參考了這兩個(gè):https://forum.nginx.org/read.php?2,299223??#2605 (NGINX + BoringSSL b

    2024年04月27日
    瀏覽(27)
  • 解決WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python

    目錄 解決WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python不可用 的問題 問題描述 解決方案 1. 檢查Python環(huán)境 2. 安裝所需的依賴 對于Debian/Ubuntu系統(tǒng): 對于Fedora/CentOS系統(tǒng): 對于MacOS系統(tǒng): 對于Windows系統(tǒng): 3. 重新安裝Python環(huán)境 4. 使用另一個(gè)包管理器

    2024年02月05日
    瀏覽(21)
  • nginx報(bào)錯:./configure: error: SSL modules require the OpenSSL library. You can either

    nginx報(bào)錯:./configure: error: SSL modules require the OpenSSL library. You can either 在nginx中配置監(jiān)聽443端口后重新加載配置文件出現(xiàn)此報(bào)錯, 原因:未安裝 ngx_http_ssl_module 模塊 解決方法:

    2024年02月05日
    瀏覽(26)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包