An open API service indexing awesome lists of open source software.

https://github.com/laozhu/nginx-configs

👨‍💻 My personal server's nginx configs, optimized for HTTPS and HTTP2
https://github.com/laozhu/nginx-configs

http2 https letsencrypt nginx nginx-configuration

Last synced: 9 days ago
JSON representation

👨‍💻 My personal server's nginx configs, optimized for HTTPS and HTTP2

Awesome Lists containing this project

README

          

# Nginx Configs Nginx

_My personal server's nginx configs, optimized for HTTPS and HTTP2_

## Install

```bash
sudo apt install nginx
sudo apt install certbot python-certbot-nginx
sudo certbot --nginx certonly
```

Then copy nginx configs to your server's `/etc/nginx` folder

```bash
ln -s /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
```

Change the `server_name: example.com` and `root /home/ritchie/www/example.com` of server to yours.

## Test

```bash
sudo nginx -t
sudo nginx reload
```

Test and change your configs until it's OK ✅.

## Renew

If certificate is getting expired in next 30 days, certbot will renew certificates automatically.

## Credits

- [Let’s Encrypt](https://letsencrypt.org/)
- [Certbot](https://certbot.eff.org/)
- [server-configs-nginx](https://github.com/h5bp/server-configs-nginx)
- [SSL Server Test](https://www.ssllabs.com/ssltest/)
- [HTTP Security Report](https://httpsecurityreport.com)
- [Mozilla SSL Configuration Generator](https://mozilla.github.io/server-side-tls/ssl-config-generator/)
- [CSP Evaluator](https://csp-evaluator.withgoogle.com/)
- [CSP Generator](https://report-uri.com/home/generate/)
- [内容安全策略](https://developers.google.com/web/fundamentals/security/csp/?hl=zh-cn)