Wlxyzxyz's Blog

nginx

树莓派安装nginx

2018/7/25

安装nginx ```shell sudo apt-get install nginx ``` 启动 sudo /etc/init.d/nginx start sudo n

nginx 多个location

2018/7/25

在 /var/www/www2 目录下新建html文件index.html。 ```shell /var/www# tree . ├── html │ ├── index.nginx

禁止cloudflare以外的ip访问nginx的网站

2019/9/1

添加一个文件cf.conf,里面记录的是允许访问的ip ``` # https://www.cloudflare.com/ips # IPv4 allow 173.245.48.0/2

用nginx部署flask

2019/9/1

## 安装uWSGI https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html ``` apt-get install

nginx反向代理其他端口服务

2020/7/2

要访问机器上除了80以外的端口需要域名加上端口链接,这样很不方便,所以就想用nginx把需要的服务代理到80端口。 nginx的配置文件在/etc/nginx/下,新增的网站服务的配置可以直接写