1
0
portfolio/config/nginx/nginx.conf
2023-02-07 22:48:26 +01:00

41 lines
989 B
Nginx Configuration File

server {
server_name matsubara.nl www.matsubara.nl;
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
server {
server_name matsubara.nl www.matsubara.nl;
server_tokens off;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# These two directives define the paths to the TLS certificate and secret key.
# These will be provisioned using Certbot and mounted into the Nginx container in the next step.
ssl_certificate /etc/letsencrypt/live/matsubara.nl/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/matsubara.nl/privkey.pem;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# to redirect all the requests to index.html,
# useful when you are using react-router
try_files $uri /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}