41 lines
849 B
Plaintext
41 lines
849 B
Plaintext
server {
|
|
listen 80;
|
|
server_name simplenotes.be;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name simplenotes.be;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/simplenotes.be/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/simplenotes.be/privkey.pem;
|
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
location /api/ {
|
|
rewrite ^/api/(.*) /$1 break;
|
|
proxy_pass http://api:8081/;
|
|
}
|
|
|
|
}
|
|
|