diff options
| author | ivar <i@oiee.no> | 2026-04-04 16:01:46 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-04-04 16:01:46 +0200 |
| commit | 59429d9d696b4c6c8d59b48769b286f65e7b1163 (patch) | |
| tree | eb7c68d20b1ed3123f8118eba8de29934dbc8417 /nginx.conf | |
| parent | 49b5af2bded29e559b3710dc6e172f979321fbd0 (diff) | |
| download | nebbet.no-59429d9d696b4c6c8d59b48769b286f65e7b1163.tar.xz nebbet.no-59429d9d696b4c6c8d59b48769b286f65e7b1163.zip | |
docs: add spec and implementation plan for draft access and slug editing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'nginx.conf')
| -rw-r--r-- | nginx.conf | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 715ac9a..0000000 --- a/nginx.conf +++ /dev/null @@ -1,71 +0,0 @@ -# nebbet.no nginx configuration -# Adjust SITE_ROOT to the absolute path of your project directory. -# Reload after changes: sudo nginx -s reload - -server { - listen 80; - listen [::]:80; - server_name nebbet.no www.nebbet.no; - - # Redirect www → apex (optional, remove if not needed) - if ($host = www.nebbet.no) { - return 301 $scheme://nebbet.no$request_uri; - } - - # ── static assets ──────────────────────────────────────────────────────── - # Served directly from source so you don't have to copy them on every build. - - location /styles/ { - alias SITE_ROOT/styles/; - expires 1d; - add_header Cache-Control "public"; - } - - location /components/ { - alias SITE_ROOT/components/; - expires 1d; - add_header Cache-Control "public"; - } - - location /lib/ { - alias SITE_ROOT/lib/; - expires 1d; - add_header Cache-Control "public"; - } - - # ── admin (password-protected) ─────────────────────────────────────────── - location /admin/ { - auth_basic "Admin"; - # The .passwords file is htpasswd-compatible (bcrypt). - # Manage with: nebbet user add <name> - auth_basic_user_file SITE_ROOT/.passwords; - - root SITE_ROOT/public; - index index.html; - try_files $uri $uri.html $uri/index.html =404; - } - - # ── public pages ───────────────────────────────────────────────────────── - location / { - root SITE_ROOT/public; - index index.html; - - # Clean URLs: /about → /about.html - try_files $uri $uri.html $uri/index.html =404; - - expires 1h; - add_header Cache-Control "public"; - } - - # ── 404 ────────────────────────────────────────────────────────────────── - error_page 404 /404.html; - location = /404.html { - root SITE_ROOT/public; - internal; - } - - # ── gzip ───────────────────────────────────────────────────────────────── - gzip on; - gzip_types text/html text/css application/javascript application/json; - gzip_min_length 1024; -} |
