@fuyb1986
2018-09-25T07:16:37.000000Z
字数 1364
阅读 643
儿童编程
# Mac 用户的文件路径
$ /usr/local/etc/nginx/sites/bcjiaoyu.conf
# Linux 用户的文件路径
$ /etc/nginx/sites/bcjiaoyu.com.conf
不是这个文件名的,修改使用的配置文件就行。
listen 0.0.0.0:80;
listen 0.0.0.0:443;
server_name localhost develop.cxy61.com;
ssl on;
ssl_certificate /opt/ca/develop.cxy61.com.pem;
ssl_certificate_key /opt/ca/develop.cxy61.com.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1.2 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
error_log /var/log/nginx/develop.cxy61.com.error.log;
access_log /var/log/nginx/develop.cxy61.com.log;
$ sudo mkdir -p /opt/ca
$ sudo cp develop.cxy61.com.* /opt/ca
$ sudo chmod a+rx -R /opt/ca
develop.cxy61.com.pem3.8kB
develop.cxy61.com.key1.6kB
$ nginx -s reload
https://develop.cxy61.com
# git bash 里面
$ mkdir -p /d/ca
$ cp develop.cxy61.com.* /d/ca
develop.cxy61.com.pem3.8kB
develop.cxy61.com.key1.6kB
<VirtualHost *:443>
ServerName develop.cxy61.com
DocumentRoot "D:\working directory\" # 自己电脑上的项目目录
SSLEngine on
SSLCertificateFile "D:\ca\develop.cxy61.com.pem"
SSLCertificateKeyFile "D:\ca\develop.cxy61.com.key"
# 改成自己使用 pass 路径
ProxyPass "/api3" "https://app.bcjiaoyu.com"
proxyPass "/server" "https://app.bcjiaoyu.com/server/"
</VirtualHost>
https://develop.cxy61.com