nexus配置https(nginx反向代理的方式)
阿新 • • 發佈:2019-04-26
rst pro _for set 域名 fault location uri min nexus配置https(nginx反向代理的方式):
apt-get install nginx
cd /etc/nginx/sites-available
cp -rv default defaults
vi defaults
listen 443 default_server; (默認為listen 80 default_server;)
ssl on;
ssl_certificate /etc/nginx/ssl/ming.crt;
ssl_certificate_key /etc/nginx/ssl/ming.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDH:AESGCM:HIGH:!RC4:!DH:!MD5:!3DES:!aNULL:!eNULL; ssl_prefer_server_ciphers on; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; proxy_pass http://aa.ming.com:8081; proxy_redirect http://aa.ming.com:8081 $scheme://aa.ming.com:443; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }
:wq
cd /etc/nginx/sites-enabled/
ln -s ../sites-available/defaults .
service nginx restart
netstat -nplt | grep 443
網址訪問:https://域名(實際即為http://域名:8081)
nexus配置https(nginx反向代理的方式)