目录
apt-get update
apt-get upgrade
apt-get install git
若要使用git clone 需要ssh-keygen -t rsa -C "your email@mail.com"
拷贝.ssh目录中的pub内容到github的SSH keys中
新建uwsgi.ini文件, 并配置
分为**源码**安装与**压缩包**稳定版安装,两者的文件安装目录不同
/etc/nginx/与/usr/local/nginx
新建 uc_nginx.conf文, 并配置
http://www.cnblogs.com/piscesLoveCc/p/5794926.html
https://www.jianshu.com/p/7cb1a824333e
https://blog.csdn.net/bestallen/article/details/52837609
现在让我们使用 [Let's Encrypt](https://letsencrypt.org/)提供的一个很好的HTTPS证书来提高我们的应用程序的安全性。
设置HTTPS从未如此简单。更好的是,我们现在可以免费获得它。他们提供了一个名为**certbot**的解决方案 ,负责为我们安装和更新证书。这非常简单:
```shell
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
```
现在安装证书:
```shell
sudo certbot --nginx
```
然后就好了,证书和私钥位置在
```shell
/etc/letsencrypt/live/www.example.com/privkey.pem
```
只需按照提示操作即可。当被问及:
```tex
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
```
选择`2`将所有HTTP流量重定向到HTTPS。
证书是 90 天的,运行
```
$ sudo certbot renew --dry-run
```
Certbot 会帮你启动一个定时任务,在证书过期时自动更新
PS:云服务器上的安全组规则里记得把 443 端口开了。
查看端口占用:netstat -ntpl
查看进程:ps aux | grep nginx //查看nginx进程
查看端口占用情况:lsof -i:80 //查看80端口占用情况
杀死进程:kill -9 3274 //3274为进程PID
Nginx安装:apt-get install nginx
Nginx启动、停止和重启命令
/etc/init.d/nginx start
/etc/init.d/nginx stop
/etc/init.d/nginx reload
Nginx压缩包安装版:
Nginx启动、停止和重启命令
/usr/local/nginx/sbin/nginx
/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx -s reload
原文:https://www.cnblogs.com/kolane/p/11537930.html