aboutsummaryrefslogtreecommitdiff
path: root/straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-03-20 19:16:32 +0100
committerLukasz Kasprzak <lukasz.kasprzak@pm.me>2026-03-20 19:16:32 +0100
commit39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2 (patch)
tree9221704f413398cfb5d5759083b1e7032566820e /straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf
parent6b59b75c3a294060dea66bdee16ffaf95ae92889 (diff)
downloadbin-39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2.tar.gz
bin-39711cf6c2ec5a3b4480dcb4800cc3802bda5bf2.zip
feat: first fully successful run e2e on straper
Diffstat (limited to 'straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf')
-rw-r--r--straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf47
1 files changed, 47 insertions, 0 deletions
diff --git a/straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf b/straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf
new file mode 100644
index 0000000..01043ff
--- /dev/null
+++ b/straper/db/public/nginx/etc-nginx/sites-enabled/labunix.conf
@@ -0,0 +1,47 @@
+# HTTP on :9080 (optional: redirect to HTTPS :9443)
+server {
+ listen 9080;
+ server_name labunix.xyz www.labunix.xyz 10.50.0.1;
+
+ # If you want redirect to HTTPS on :9443:
+ return 301 https://$host:443$request_uri;
+
+ # If you prefer serving plain HTTP instead, comment the return above
+ # and uncomment this:
+ # root /srv/www/labunix/public;
+ # index index.html;
+ # location / { try_files $uri $uri/ =404; }
+}
+
+# HTTPS on :9443
+server {
+ listen 443 ssl;
+ http2 on;
+ server_name labunix.xyz www.labunix.xyz 10.50.0.1;
+
+ root /srv/www/labunix/public;
+ index index.html;
+
+ ssl_certificate /etc/letsencrypt/live/labunix.xyz/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/labunix.xyz/privkey.pem;
+
+ add_header Onion-Location "http://l6xtdi33ubszm2gswstchrb6o4d6aw3ewj2irexlsbzk6pvesky7p2ad.onion$request_uri" always;
+
+ location / {
+ try_files $uri $uri/ =404;
+ }
+ location /stats/ {
+ alias /srv/stats/;
+ index goaccess.html;
+ allow 127.0.0.1;
+ allow 10.50.0.0/24;
+ allow 192.168.33.0/24;
+ deny all;
+ }
+
+ location ~* \.(css|js|png|jpg|jpeg|gif|svg|webp|ico|woff2?)$ {
+ expires 30d;
+ add_header Cache-Control "public, max-age=2592000, immutable";
+ try_files $uri =404;
+ }
+}