use ssl in nginx
This commit is contained in:
parent
97e7352f57
commit
5f424722f7
|
@ -132,6 +132,15 @@ echo -e "\033[1;32m“nginx”起一个web服务......\033[0m"
|
||||||
cd $nginx_conf
|
cd $nginx_conf
|
||||||
echo "server {
|
echo "server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
server_name ecbot.nctu.me;
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
ssl on;
|
||||||
|
ssl_certificate /etc/ssl/certificate-all.crt;
|
||||||
|
ssl_certificate_key /etc/ssl/private.key;
|
||||||
server_name $YOUR_DOMAIN_NAME;
|
server_name $YOUR_DOMAIN_NAME;
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:23333/;
|
proxy_pass http://127.0.0.1:23333/;
|
||||||
|
|
Loading…
Reference in New Issue