2022-06-14 21:42:52 +00:00
|
|
|
server {
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
|
|
|
server_name fuz.re;
|
|
|
|
root /var/www/fuz.re/public;
|
|
|
|
|
|
|
|
# SSL
|
|
|
|
ssl_certificate /etc/letsencrypt/live/fuz.re/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/fuz.re/privkey.pem;
|
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/fuz.re/chain.pem;
|
|
|
|
|
|
|
|
# security
|
|
|
|
include snippets/security.conf;
|
|
|
|
|
|
|
|
# index.html fallback
|
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
}
|
|
|
|
|
|
|
|
# index.php fallback
|
|
|
|
location ~ ^/api/ {
|
|
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
|
|
}
|
|
|
|
|
|
|
|
# additional config
|
|
|
|
include snippets/general.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
# subdomains redirect
|
|
|
|
server {
|
|
|
|
listen 443 ssl http2;
|
|
|
|
listen [::]:443 ssl http2;
|
2022-06-14 22:14:45 +00:00
|
|
|
server_name fuz.re www.fuz.re;
|
2022-06-14 21:42:52 +00:00
|
|
|
|
|
|
|
# SSL
|
|
|
|
ssl_certificate /etc/letsencrypt/live/fuz.re/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/fuz.re/privkey.pem;
|
|
|
|
ssl_trusted_certificate /etc/letsencrypt/live/fuz.re/chain.pem;
|
|
|
|
return 301 https://fuz.re$request_uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
# HTTP redirect
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
listen [::]:80;
|
2022-06-14 22:14:45 +00:00
|
|
|
server_name fuz.re www.fuz.re;
|
2022-06-14 21:42:52 +00:00
|
|
|
include snippets/letsencrypt.conf;
|
|
|
|
|
|
|
|
location / {
|
|
|
|
return 301 https://fuz.re$request_uri;
|
|
|
|
}
|
|
|
|
}
|