Nginx SSL HTTPS证书配置

编程教程 > nginx (43) 2025-02-28 12:32:02

Nginx 安装

Nginx 安装参考:

Nginx 配置SSL/HTTPS证书

server {
   listen       443 ssl http2;
   server_name  docker.example.com;
   ssl_certificate      /usr/local/openresty/nginx/conf/ssl/hub.example.cn.crt;
   ssl_certificate_key  /usr/local/openresty/nginx/conf/ssl/hub.example.cn.key;
   location / {
       proxy_pass http://192.168.1.2:5080;
   }
}

 

腾讯云SSL 证书使用文件参考

ssl_certificate /path/to/domain_name.com_bundle.crt;
ssl_certificate_key /path/to/domain_name.com.key;

评论
User Image
提示:请评论与当前内容相关的回复,广告、推广或无关内容将被删除。

相关文章
Nginx 安装Nginx 安装参考:Linux yum nginx安装和nginx入门配置方法-XQLEE'BlogAlpine Linux nginx安装配
Nginx 配置日志nginx默认的日志配置在nginx.conf配置文件。
nginx配置文件检查命令正确命令:nginx -t -c /etc/nginx/nginx.conf错误命令:nginx -t -c /etc/nginx/conf.d/example.con...
nginx开启gzip压缩配置配置参考:server{listen443ssl;server_namet.example.com;#charsetkoi8-r;#access_log/var/l...
PVE配置nginx代理访问。nginx配置:server { listen 10101 ssl; server_name pve.ok.top; #ssl on; #从腾...
最终看起来像这样 nginx (host,ssl) -&gtl; harbor-nginx (non-ssl) -&gtl; harbor。说明首先服务上安装有 nginx,且
Linux(centos) nginx安装和nginx入门配置方法1.切换至root用户$su - 2.执行在线安装命令#yum install nginx -y 如果上面提示以下内容[root...
alpineLinux安装nginx更新软件apkupdate安装nginxapkaddnginx查看nginx版本nginx-vnginx启停启动停止servicenginxstop重启ser...
最近博客升级总是nginx原生的502页面,感觉有些不友好,特此研究了下502页面的配置nginx 502配置502页面核心配置 #502 page error_...
需求将静态资源如css/js/图片缓存到不用每次都到后端服务去拿取,减少性能消耗。 配置nginx缓存配置缓存文件存放信息在nginx配置文件,httpd内部配
nginx 跨域头统一配置 location / { add_header Access-Control-Allow-Origin *; add_header Acces...
Nginx 配置robots.txt禁止收录,在对应的server里面添加以下配置 location =/robots.txt { default_type t
打开任务管理器发现一大堆nginx进程
nginx常规使用时作为http协议的反向代理,这里要讲的是非http的Mysql端口代理,理论支持其他协议nginx.conf配置如下:user nginx; worker_process...
nginx日志默认格式如下:$remote_addr-$remote_user[$time_local]"$request"$status$body_bytes_sent"$http_refer...