generated from nhcarrigan/template
fc252e28e2
Adds a deny-dotfiles snippet that returns 403 for any URI matching /\. (e.g. .gitconfig, .env, .git/) and includes it in every server block.
20 lines
470 B
Plaintext
20 lines
470 B
Plaintext
# Elowyn Angular SPA.
|
|
server {
|
|
listen 443 ssl;
|
|
server_name elowyn.nhcarrigan.com;
|
|
ssl_certificate /etc/letsencrypt/live/elowyn.nhcarrigan.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/elowyn.nhcarrigan.com/privkey.pem;
|
|
|
|
root /home/naomi/elowyn;
|
|
|
|
location / {
|
|
index index.html;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location ~* \.(js|css)$ {
|
|
try_files $uri $uri/ @rewrite;
|
|
}
|
|
include /etc/nginx/snippets/deny-dotfiles.conf;
|
|
}
|