可以使用listen指令来指定 HTTPS 的端口,然后使用ssl和http2指令来启用 SSL 和 HTTP/2 功能。例如:se...
# nginx.confdaemonoff;pidtmp/nginx.pid;error_logstderrdebug;events{}http{access_logtmp/access.log;default_typetext/html;server{listen443ssl;# SSL 协议版本ssl_protocolsTLSv1.2;# 证书ssl_certificatessl/rsa.pem;# 私钥ssl_certificate_keyssl/rsa.key;# ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:...
server{listen9080;server_name10.115.6.165;location/databoard/{proxy_pass https://10.115.6.165:19026/databoard/;proxy_set_header Host $host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_headerREMOTE-HOST$remote_addr;proxy_set_headerX...
listen 80; server_name localhost; return 301 https://localhost$request_uri; charset UTF-8; location / { root html; # 这个是指定一个项目所在目录 index index.html index.htm; # 这个是指定首页的文件名 } } server { listen 80 default backlog=2048; listen 443 ssl; server_name localhost; ssl...
一、nginx配置https,tomcat也配置https 1、nginx配置https ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 upstream https_tomcat_web { server 127.0.0.1:8443; } server { listen 443; server_name www.test....
listen 80; server_name www.drz.com; root /data/code; index index.html; charset utf-8; } 2.配置nginx页面 Copy [root@web01 code]# vim index.html<!DOCTYPE html> 我是title 我是Article 创建时间:2018/8/10 Aticle第一次用h5写文章,好...
listen 443 ssl; server_name a.szy.net; charset utf-8; #ssl_certificate E:/https/113152522630995.pem; #ssl_certificate_key E:/https/113152522630995.key; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on;... } #授权服务匹配 ...
Set the NGINX listen port By default, NGINX listens on the port specified inexternal_urlor uses the standard port (80 for HTTP, 443 for HTTPS). If you run GitLab behind a reverse proxy, you might want to override the listen port. ...
listen 80; server_name ;#这里很重要二级域名配置 rewrite ^(.*)$ https://$host$1 permanent; #用于将http页面重定向到https页面 location / { proxy_pass http://127.0.0.1:9897;#nodejs后端项目地址端口,开启HTTP强制转HTTPS后直接走HTTPS里的 ...
listen 443 ssl http2 fastopen=3 reuseport; ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH...