mirror of
https://github.com/tanrax/org-social-website
synced 2026-01-07 05:43:35 +01:00
28 lines
550 B
Nginx Configuration File
28 lines
550 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Serve social.org as plain text
|
|
location = /social.org {
|
|
default_type text/plain;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Cache static assets
|
|
location ~* \.(css|png|jpg|jpeg|gif|ico|svg)$ {
|
|
expires 1d;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_types text/css application/javascript text/plain;
|
|
gzip_min_length 1000;
|
|
}
|