my blog my blog

Tag: http
Nginx强制http跳转至https

奶牛启用https后发现还是在http和https共存的时候出现一些小问题,遂决定使用Nginx强制跳转https。

vim /usr/local/nginx/conf/vhost/nenew.net.conf

在配置文件的listen 80这段中插入语句

rewrite ^(.*)$  https://www.nenew.net$1 permanent;

然后重启Nginx即可。

windows下git bash如何使用http、https代理

 

以goagent的代理设置为例吧

  1. export http_proxy="http://127.0.0.1:8087" 
  2. export https_proxy="http://127.0.0.1:8087" 

这样子git bash的http和https访问都会走代理了,但是可能会涉及到https证书错误的问题,出现错误提示SSL certificate problem: unable to get local issuer certificate

  1. git config --global http.sslVerify false