User Tools

Site Tools


nginx

This is an old revision of the document!


# Nginx 配置gzip加速网页加载速度

参考[How To Add the gzip Module to Nginx on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-add-the-gzip-module-to-nginx-on-ubuntu-14-04)

# Nginx配置ssl证书

参考[How To Secure Nginx with Let's Encrypt on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)

# Nginx配置Host以便响应服务器获取跳转前的地址

场景:服务器端需要拿到浏览器中的url,但是这个url经过了nginx转发,默认拿到的是转发后的url,如果需要拿到之前的url,就需要配置proxy_set_header

```bash location / { proxy_pass http://my_app_upstream; proxy_set_header Host $host;

  # ...

} ```

nginx.1540353858.txt.gz · Last modified: 2021/02/10 21:29 (external edit)