Put reuseport into the default site config
This commit is contained in:
parent
dcd36c9051
commit
616669f832
@ -9,7 +9,7 @@ These are my NGINX configurations. They are written for Fedora CoreOS's `nginx-c
|
|||||||
1. Install `nginx-core`, `nginx-mod-stream`, and `policycoreutils-python-utils` on Fedora. Makesure `rsync` is available on the OS.
|
1. Install `nginx-core`, `nginx-mod-stream`, and `policycoreutils-python-utils` on Fedora. Makesure `rsync` is available on the OS.
|
||||||
2. Comment out the default server block in `/etc/nginx/nginx.conf`.
|
2. Comment out the default server block in `/etc/nginx/nginx.conf`.
|
||||||
3. Run `setup.sh`
|
3. Run `setup.sh`
|
||||||
4. Make a dummy vhost listening on port `80` with the server_name you want.
|
4. Generate a certificate with your hostname with the `certbot/default-quic` example. Copy `etc/nginx/conf.d/sites_default_quic.conf` to the corresponding directory on your server and edit it approprieately.
|
||||||
5. Generate certificates with the example in the certbot directory.
|
5. Generate certificates with the example in the certbot directory.
|
||||||
6. Make your actual vhost config based on the `sites_.*` samples in `/etc/nginx/conf.d`.
|
6. Make your actual vhost config based on the `sites_.*` samples in `/etc/nginx/conf.d`.
|
||||||
|
|
||||||
|
7
certbot/default-quic
Normal file
7
certbot/default-quic
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
certbot certonly --webroot --webroot-path /srv/nginx --no-eff-email \
|
||||||
|
--key-type ecdsa --must-staple \
|
||||||
|
--deploy-hook "certbot-ocsp-fetcher -o /var/cache/certbot-ocsp-fetcher" \
|
||||||
|
--cert-name hostname.of.your.server \
|
||||||
|
-d hostname.of.your.server
|
||||||
|
|
||||||
|
restorecon -Rv /var/cache/certbot-ocsp-fetcher
|
7
certbot/miniflux
Normal file
7
certbot/miniflux
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
certbot certonly --webroot --webroot-path /srv/nginx --no-eff-email \
|
||||||
|
--key-type ecdsa --must-staple \
|
||||||
|
--deploy-hook "certbot-ocsp-fetcher -o /var/cache/certbot-ocsp-fetcher" \
|
||||||
|
--cert-name miniflux.yourdomain.tld \
|
||||||
|
-d miniflux.yourdomain.tld
|
||||||
|
|
||||||
|
restorecon -Rv /var/cache/certbot-ocsp-fetcher
|
@ -3,3 +3,5 @@ certbot certonly --webroot --webroot-path /srv/nginx --no-eff-email \
|
|||||||
--deploy-hook "certbot-ocsp-fetcher -o /var/cache/certbot-ocsp-fetcher" \
|
--deploy-hook "certbot-ocsp-fetcher -o /var/cache/certbot-ocsp-fetcher" \
|
||||||
--cert-name uptime.yourdomain.tld \
|
--cert-name uptime.yourdomain.tld \
|
||||||
-d uptime.yourdomain.tld
|
-d uptime.yourdomain.tld
|
||||||
|
|
||||||
|
restorecon -Rv /var/cache/certbot-ocsp-fetcher
|
17
etc/nginx/conf.d/sites_default_quic.conf
Normal file
17
etc/nginx/conf.d/sites_default_quic.conf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
server {
|
||||||
|
listen ipv4_1:443 quic reuseport;
|
||||||
|
listen ipv4_1:443 ssl;
|
||||||
|
listen [ipv6_1]:443 quic reuseport;
|
||||||
|
listen [ipv6_1]:443 ssl;
|
||||||
|
|
||||||
|
server_name hostname.of.your.server;
|
||||||
|
|
||||||
|
include snippets/universal_paths.conf;
|
||||||
|
include snippets/hsts.conf;
|
||||||
|
include snippets/quic.conf;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/hostname.of.your.server/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/hostname.of.your.server/privkey.pem;
|
||||||
|
ssl_trusted_certificate /etc/letsencrypt/live/hostname.of.your.server/chain.pem;
|
||||||
|
ssl_stapling_file /var/cache/certbot-ocsp-fetcher/hostname.of.your.server.der;
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
# This file assumes you have an uptime kuma instance running on the server
|
# This file assumes you have an uptime kuma instance running on the server
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen ipv4_1:443 quic reuseport;
|
listen ipv4_1:443 quic;
|
||||||
listen ipv4_1:443 ssl;
|
listen ipv4_1:443 ssl;
|
||||||
listen [ipv6_1]:443 quic reuseport;
|
listen [ipv6_1]:443 quic;
|
||||||
listen [ipv6_1]:443 ssl;
|
listen [ipv6_1]:443 ssl;
|
||||||
|
|
||||||
server_name uptime.yourdomain.tld;
|
server_name uptime.yourdomain.tld;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user