52 lines
1.4 KiB
Plaintext
Executable File
52 lines
1.4 KiB
Plaintext
Executable File
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;
|
|
server_name fuz.re www.fuz.re;
|
|
|
|
# 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;
|
|
server_name fuz.re www.fuz.re;
|
|
include snippets/letsencrypt.conf;
|
|
|
|
location / {
|
|
return 301 https://fuz.re$request_uri;
|
|
}
|
|
} |