56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
server {
|
|||
|
|
listen 80;
|
||
|
|
listen [::]:80;
|
||
|
|
server_name decepub.thepra.dev;
|
||
|
|
|
||
|
|
location ^~ /.well-known/acme-challenge/ {
|
||
|
|
root /var/www/acme;
|
||
|
|
default_type "text/plain";
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
return 301 https://$host$request_uri;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl;
|
||
|
|
listen 8444 ssl proxy_protocol;
|
||
|
|
listen [::]:443 ssl;
|
||
|
|
server_name decepub.thepra.dev;
|
||
|
|
http2 on;
|
||
|
|
|
||
|
|
include /etc/nginx/ssl.conf;
|
||
|
|
ssl_certificate /root/.acme.sh/decepub.thepra.dev_ecc/fullchain.cer;
|
||
|
|
ssl_certificate_key /root/.acme.sh/decepub.thepra.dev_ecc/decepub.thepra.dev.key;
|
||
|
|
include /etc/nginx/snippets/decepub-headers.conf;
|
||
|
|
|
||
|
|
access_log /var/log/nginx/decepub.thepra.dev.access.log;
|
||
|
|
error_log /var/log/nginx/decepub.thepra.dev.error.log;
|
||
|
|
|
||
|
|
root /var/www/decepub.thepra.dev;
|
||
|
|
index index.html;
|
||
|
|
gzip_static on;
|
||
|
|
open_file_cache off;
|
||
|
|
|
||
|
|
location ^~ /.well-known/acme-challenge/ {
|
||
|
|
root /var/www/acme;
|
||
|
|
default_type "text/plain";
|
||
|
|
}
|
||
|
|
|
||
|
|
location = /index.html { expires -1; }
|
||
|
|
location = /build.json { expires -1; }
|
||
|
|
location = /appsettings.json { expires -1; }
|
||
|
|
location = /service-worker.js { expires -1; }
|
||
|
|
location = /service-worker-assets.js { expires -1; }
|
||
|
|
|
||
|
|
location ^~ /_framework/ {
|
||
|
|
expires 1h;
|
||
|
|
try_files $uri =404;
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
expires -1;
|
||
|
|
try_files $uri $uri/ /index.html;
|
||
|
|
}
|
||
|
|
}
|