#nginx

Rad Web Hostingradwebhosting
2025-05-17

How to Setup a Reverse with HTTPS Using and (5 Minute Quick-Start Guide)

This article outlines how to setup a reverse proxy with HTTPS using Nginx and Certbot.
What is a Reverse Proxy?
A reverse proxy is a server that sits between client devices and a backend server, forwarding client requests to the backend server and returning the server's response to the clients. Unlike a forward proxy, ...
Continued 👉 blog.radwebhosting.com/how-to-

Kuba Suder • @mackuba.eu on 🦋mackuba@martianbase.net
2025-05-17

Ok, I think I managed to fix the caching config for Skythread in Nginx so that things are always reloaded and not cached after I make a deploy 😮‍💨

Does this make sense? (index.html is patched on deploy to link to e.g. /skythread.js?123123 where 123123 is timestamp of deploy)

#nginx #webdev

map $query_string $js_cache_control {
  default        "no-cache";
  "~^[0-9]+$"    "public, max-age=31536000, immutable";
}

server {
  server_name blue.mackuba.eu;
  listen 443 ssl;

  location /skythread/ {
    alias /var/www/skythread/current/;

    access_log /var/log/nginx/skythread-access.log full_with_duration buffer=16k flush=10s;
    error_log /var/log/nginx/skythread-error.log;

    index index.html;

    try_files $uri $uri/ $uri.html =404;

    include sites-available/static-headers.inc;

    add_header Content-Security-Policy "default-src 'none'; script-src https://blue.mackuba.eu/skythread/ 'sha256-C5RUxaoIkpRux1/UhIgLL5RalHWo6EOGHzWOhCMr8Fs='; style-src https://blue.mackuba.eu/skythread/style.css https://blue.mackuba.eu/skythread/fontawesome/; img-src https:; font-src https://blue.mackuba.eu/skythread/fontawesome/; script-src-attr 'none'; style-src-attr 'none'; connect-src https:; base-uri 'none'; frame-ancestors 'none'; form-action 'none'";
    add_header Cache-Control no-cache;

    location ~* \.(js|css|jpg|png|svg|woff2)$ {
      include sites-available/static-headers.inc;

      add_header Content-Security-Policy "default-src 'none'; script-src https://blue.mackuba.eu/skythread/ 'sha256-C5RUxaoIkpRux1/UhIgLL5RalHWo6EOGHzWOhCMr8Fs='; style-src https://blue.mackuba.eu/skythread/style.css https://blue.mackuba.eu/skythread/fontawesome/; img-src https:; font-src https://blue.mackuba.eu/skythread/fontawesome/; script-src-attr 'none'; style-src-attr 'none'; c(…)
2025-05-16

Me and Kubernetes are not friends

Kubernetes in all its gloryWe are not enemies either. These days I'm mostly indifferent, that's all. I used to oppose K8S with every inch of my body. Not anymore, at least. Frankly, it's not K8S [...]

🔗 chbk.co/3IlGK

#bash #debian #docker #ghost #linux #nginx #prometheus #shell #kubernetes

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-05-16

@dvl @ronnie_bonkers @freshports Hm, well, if you use #nginx, you *could* check out #swad as well (after I made another release to avoid unnecessary sessions). It's much smaller, and leaves the actual reverse proxying to nginx.

I'm just still unsure how it would scale to more traffic. I tried to stress-test it with jmeter now and what I can say is simulating 1000 concurrent clients really hammering the login endpoint for quite a while, I managed to inflate resident size to 171MiB, which is probably a result of 1000 sessions plus quite some metadata for the rate-limiting (most responses ended up 429).

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-05-16

I now decided I'll at least aim for some middle grounds: Rework #swad so it only needs a (server-side) #session once a user is #authenticated!

This does have some implications, e.g. passing a redirect argument to the authentication endpoint won't work any more. But experimentation shows a workaround would be to use an "internal redirect" to the login endpoint in #nginx.

We'll see where I end up. Having sessions only for authenticated users should reduce the need for server-side RAM significantly, so I hope 😉

Rowland Mosbergenrowlandm@disabled.social
2025-05-15

I think I'm going to end up hosting the flask application on #Oracle #cloud free tier, because I don't feel that the amount of website hits to the flask application should crash the server.

It's a bit of a shame because now I have to remember how to do #nginx and #gunicorn on a straight VM because I think that's all that's available in the Oracle free tier.

Chris Alemany🇺🇦🇨🇦🇪🇸chris@mstdn.chrisalemany.ca
2025-05-15

HEY! I just found the fix for the webfinger "403 forbidden” problem I have been having to get my wordpress blog working fully with ActivityPub @pfefferle!

Looks like for nginx based servers if you are rolling your own or you have a strict web host you need to create a location statement in your nginx config options

The code to add to your options is:

location ^~ /.well-known/webfinger {
auth_basic off;
allow all;
default_type text/plain;
try_files $uri $uri/ /index.php?$args;
break;
}

From this wordpress support question:

wordpress.org/support/topic/i-

After adding this, the test at webfinger.net/lookup outputs a proper response and Wordpress clears the 'webfinger' error in SiteHealth.

Yay!
#ActivityPub #Wordpress #Mastodon #Fediverse #nginx #selfhost

A screenshot of the response from webfinger.net when I try my website shows a 403 Forbidden error in the Request LogA screenshot after implementing the code in the nginx file shows a successful request and JSON Resource Descriptor lookup.
Gerben Jacobsgerben.dev@gerben.dev
2025-05-15

I added some of the infrastructure resources to my repo, this includes the configuration for Systemd and Nginx, both are used to run my website gerben.dev.

Created a readme for that folder with some more information and a diagram. It's not a full on guide, but for anyone on the #IndieWeb who wants to learn more, you can use it as a learning resource.

You can find it on GitHub or Codeberg.

#Infra #Systemd #Nginx #IndieWeb

Diagram of gerben.dev infrastructure: Let's Encrypt, Cloudflare, to a VPS with Nginx and Systemd and a Go service that hosts it
2025-05-15

You cannot login to your #nextcloud installation in your browser?
Your instance is located in a sub directory (say yoursubdir)?
And your browser fails to load logo.svg (status 500) which causes oauth token invalidation?

#TIL Three lines in your nginx.conf work as a workaround:

location = /core/img/logo/logo.svg {
try_files $uri /yoursubdir$request_uri;
}

Alternatively put a (custom) logo.svg at the expected place.

#selfhost #homeserver #nginx #owncloud #heimserver

2025-05-13

New treat incoming: I played around with #Podman and #Nginx as a #ReverseProxy. And as usual I ended up creating a new vagrant-libvirt setup...

codeberg.org/johanneskastl/ngi
github.com/johanneskastl/nginx

One container running as a server (with a very valuable index.html...) and another container as reverse proxy.

Two branches, one with quadlets (where everything worked out of the box) and another running "normal" containers.

#DevOps #Nginx #Ansible #vagrant #libvirt #podman #containers #hellyeah

Felix Palmen :freebsd: :c64:zirias@bsd.cafe
2025-05-13

Just released: #swad 0.7! 😎

Swad is the "Simple Web Authentication Daemon". If you're looking for a solution to add cookie/form #authentication to your #nginx reverse proxy, or maybe even a #lightweight alternative to #Anubis which leaves the actual proxying to nginx, this might be for you! It is designed for use with nginx' auth_request, written in pure C, with minimal dependencies (zlib and, depending on build options, openssl/libressl and/or libpam), and compiles to a small binary (currently between 150kiB and less than 300kiB depending on compiler and target platform).

Swad should work on many #posix (and almost) systems. It's actually tested on #FreeBSD (in "production" use, but on a very low-traffic private site), and quick functionality tests also done on #Debian (#Linux) and #OpenIndiana (#Illumos, open-source #Solaris descendant).

As announced, this release doesn't bring any new features (in terms of WHAT it can do), but great improvements "under the hood", that should help performance at least on some platforms, see release notes for swad 0.7.

Read more, and download the .tar.xz (to build and install it 😆) here:
github.com/Zirias/swad

wakest ⁂liaizon@wake.st
2025-05-13

While at the compost.party picnic the other day @computersandblues showed me how to edit the #nginx file responsible for redirecting domain.tld/index.html to domain.tld and I added a line to support index.txt and index.svg which was so easy. But one thing I then thought, is there any way to tell a browser to use a different font then the default other then thru CSS or HTML?

Anyone know of a way to get view counter on your website served via Caddy?

#caddy #smallweb #nginx #reverseproxy #viewcounter #neocities #css #html #nginx

Wilda SoftwareWildaSoftware
2025-05-13

Krótki i przyjemny artykuł dla adminów i osób zajmujących się ustawianiem NGINX na serwerze, przy czym z porad mogą skorzystać pewnie też osoby mające do czynienia z innymi serwerami HTTP.

medium.com/@js_9757/advanced-n

N-gated Hacker Newsngate
2025-05-13

Oh, the irony! A website called 'The Beam' shines a light on... absolutely nothing. 🚫🔦 Apparently, the only thing beaming is the "403 Forbidden" message served up by our good friend, . 😂
erlang-solutions.com/blog/the-

Santiago Lema :amiga:santi@go.lema.org
2025-05-12
A script to update your home ip your nginx config so it allows access without login but asks for auth elsewhere (instructions in comment).

https://gist.lema.org/santiago/51c28a9238b84a66a910fe39179cdffa

#gist #nginx #bash
2025-05-12

Введение в Angie: краткая история и отличия от Nginx

Это первая из статей, посвященных веб-серверу Angie. Мысль создать цикл статей возникла в процессе разработки курса по администрированию Nginx и Angie. Приходилось сталкиваться с темами, которые довольно слабо описаны в открытых источниках, либо не описаны вообще. В планах описать типичные области его использования с реальными примерами доступным языком. Так как большинство решений и конфигов будет совместимо с Nginx, надеюсь цикл будет полезен сообществу.

habr.com/ru/articles/905990/

#angie #nginx #angie_pro #nginx_plus

2025-05-12

Mystery maybe kind of solved? 16k+ sessions stuck in FIN_WAIT_1, _2 and growing over time with our webserver, Nginx.

After a lot of fiddling with sysctl timeouts nothing made a difference, after a restart the numbers always started climbing again.

Removing the dataready accept filter seems to have done the trick, now numbers have been stable for the past hour. I'll check again later and see if that solves it!

#FreeBSD #Nginx #AdminLife

Thomas (aka Papa Dragon)dragondaddy@caselibre.fr
2025-05-11
Bon, allez, après une soirée entière à me prendre la tête, j'abandonne. Aussi bien haproxy que nginx, je n'arrive pas à faire en sorte d'avoir un reverse-proxy opérationnel devant YunoHost. En gros, j'arrive quand même à faire en sorte que tous les services web fonctionnent avec haproxy, mais dans les logs, toutes les connexions entrantes sont enregistrées dans les logs comme venant de l'IP du serveur de proxy, rendant fail2ban totalement inutile, voire dangereux. Il y a apparemment des solutions, mais pas du tout adaptées à la façon dont fonctionne YunoHost.

Bref, je laisse tomber, je me ferai une petite ferme de serveurs auto-hébergés le jour où je me sentirai capable de monter des services à la main, moulés à la louche à l'ancienne, sans utiliser une solution comme YunoHost. Ou bien j'attendrai sagement que IPv4 ait totalement disparu d'internet.

#AdminEnCarton #YunoHost #ReverseProxy #HAProxy #Nginx #IPv4SayNul
2025-05-10

💡 #DWDsTips

If you use CloudFlare to reverse proxy to your server, they add the header "CF-Connecting-IP" and "CF-Connecting-IPv6"to supply you with the originator IP address.

In NGINX, you can access these headers via:

:terminal: $http_CF_Connecting_IP
:terminal: $http_CF_Connecting_IPv6

🌐 developers.cloudflare.com/supp

#NGINX #CloudFlare #ReverseProxy #Webhosting #Ubuntu

NGINX log, demonstrating the CF-Connecting-IP header

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst