Nginx伺服器下公升級https的方法步驟

2021-09-26 05:39:10 字數 1633 閱讀 6919

購買證書

可以去阿里雲的雲盾證書服務購買

配置nginx

2、開啟 nginx 安裝目錄下 conf 目錄中的 nginx.conf 檔案

3、重啟 nginx

$cd/usr/local/nginx/sbin

$ ./nginx-s reload

錯誤詳解

1、nginx如果未開啟ssl模組,配置https時提示錯誤

nginx開啟ssl模組

切換到原始碼包:

修改新的configure引數

配置完成後,執行命令

$ make //這裡不要進行make install,否則就是覆蓋安裝

備份原有已安裝好的nginx

$cp/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.bak

將剛剛編譯好的nginx覆蓋掉原有的nginx

$ cp ./objs/nginx /usr/local/nginx/sbin/

重啟 nginx

$cd/usr/local/nginx/sbin

$ ./nginx-s reload

高效能Http伺服器nginx

nginx介紹 nginx是一款採用linux 2.6核心epoll新機制開發的web伺服器軟體,能極大地提高web訪問特別是小檔案訪問的i o效能,是c10k問題的乙個解決方案。在高併發連線的情況下,nginx是apache伺服器不錯的替代品。nginx同時也可以作為7層負載均衡伺服器來使用。高併...

nginx配置http靜態站點伺服器

1 系統環境windows 10 2 設定靜態站點目錄,注意不要出現中文 這裡踩了很多坑,可以檢視錯誤日誌error.log,這裡測試了一下目錄 3 配置nginx.conf server location download error page 404 404page index.html 監聽埠...

Linux下搭建HTTP伺服器

配置 1.掛載 2.本地源配置檔案 3.安裝httpd軟體 4.檢視http狀態 5.重啟程式 6.關閉防火牆 7.關閉selinux 特殊目錄 etc httpd 配置目錄 etc httpd conf 主配置目錄 etc httpd conf.d 輔助配置目錄 var www html 文件根目...