kcl-digital-humanities-garden/nginx.conf
tobias 36238a8e87
Some checks failed
GitHub Pages Deploy / deploy (push) Waiting to run
JS Lint / lint (push) Waiting to run
HTMLProofer / test (2.7) (push) Waiting to run
HTMLProofer / test (3.0) (push) Waiting to run
continuous-integration/drone/push Build is failing
Add .html to uri in nginx
2024-07-15 18:24:55 +02:00

37 lines
844 B
Nginx Configuration File

events {
worker_connections 1024;
}
http {
include mime.types;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 80;
location / {
root /usr/share/nginx/html;
try_files $uri $uri.html $uri/ =404;
}
location /error_page.html {
internal;
}
location ~* \.(jpg|jpeg|png|gif|ico|css|js|htm|html)$ {
root /usr/share/nginx/html;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
error_page 404 /error_page.html;
}
}