eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

201
active users

#Apache2

0 posts0 participants0 posts today

If you're running Nextcloud on top of Apache2 on Debian 12 server and after upgrading to Debian 13 server it refuses to start up again, do the following:

a2dismod php8.2
a2enmod php8.4
systemctl restart apache2

At least that was what I needed to do.

Continued thread

Die zwei neue Mixture of Experts-Modelle unter Apache 2.0 Lizenz:
Das 120B-Modell erreicht Reasoning-Performance vergleichbar mit o4-mini – auf einer einzigen 80 GB GPU.
Das kompakte 20B-Modell läuft sogar auf Laptops mit ~16 GB RAM.
Beide unterstützen Chain-of-Thought, Tool-Use (z. B. Websuche, Codeausführung) und agentische Workflows – vollständig lokal einsetzbar und kommerziell nutzbar.
theguardian.com/technology/202
#OpenWeights #LLM #Apache2

The Guardian · OpenAI takes on Meta and DeepSeek with free and customisable AI modelsBy Dan Milmo
Replied in thread

Okay, this SEEMS to work. The database is just the start addresses for lots of /8, /16, /24 or /32 ranges (depending on the size of the requested block - e.g. a /22 range gets written as the start address for four /24s) taken from okean.com/antispam/iptables/rc and mapped to "BLOCKED" and then built into a database file with `httxt2dbm`.

```
# Extract IP parts
RewriteCond %{REMOTE_ADDR} ^((([0-9]+)\.[0-9]+)\.[0-9]+)\.[0-9]+$
RewriteRule . - [E=subnet8:%3.0.0.0,E=subnet16:%2.0.0,E=subnet24:%1.0,E=subnet32:%0]

# Tarpit provided by a Mastodon user - mastodon.social/@pcarrier/1124
# We don't have access to mod_cspnonce yet, so fudge a random-ish value
RewriteCond ${greatfirewall:%{ENV:subnet8}} =BANNED [OR]
RewriteCond ${greatfirewall:%{ENV:subnet16}} =BANNED [OR]
RewriteCond ${greatfirewall:%{ENV:subnet24}} =BANNED [OR]
RewriteCond ${greatfirewall:%{ENV:subnet32}} =BANNED
RewriteRule . srv.us/tarpit?nonce=%{REMOTE_PORT}%{TIME} [L,E=donotlog:1,R=301]
```

(`donotlog` is used later to avoid logging, because when they hit so hard and so often then I don't need that bloat in my server logs!)
Not yet worked out why it only seemed to work within <VirtualHost> blocks.

Replied in thread

Deleted the database and recreated it from scratch (rather than updating it) and "page 599 is on free list with type 13", "PANIC: Invalid argument" and "Error string not specified yet" have all gone away. So apparently they mean "I don't like the existing database but can't handle it cleanly" 😐

Replied in thread

Debugging this and… it looks like the problem might be the backref to a previous RewriteCond?

I've got a similar "block these hosts" RewriteMap using `%{REMOTE_ADDR}` as the key and that works. But using `%1` as a key when the previous RewriteCond is "extract a subset of the octets" fails to look up correctly. Which I've confirmed with a noddy "extract from the query string" lookup.

But then again, it's not working with an env var either. I can do a capture with a RewriteCond, set an env var with a RewriteRule, then do a second RewriteRule using the env var and it works. But if I use `${testmap:%{ENV:testvar}}` then it doesn't find anything. Even though I've shown that the env var on its own contains the expected value.

Replied in thread

Oh, FFS. Can't get this working. And can't get Apache to give me enough logging to understand why.

I've got a rewrite map in bdb, it contains IP blocks that are banned (generated from a Python script). I've got rewrite conds that match each of four, three, two or one octets and then try to look them up in the map. If there's a match then it gets tar-pitted. But I'm always getting failed lookups.

The annoying bit is that even trace4 isn't telling me what the input to the map lookup is. Only the result of the lookup when it is compared to the "was it blocked" value.

Maybe I need to drop the zero octets rather than filling them in? Hopefully it's not that RewriteCond captures can't be used as a key in the map lookup.

After seeing
Improving snac Performance with Nginx Proxy Cache from @itnotes@snac.it-notes.dragas.net via
https://snac.it-notes.dragas.net/itnotes/p/1738139676.258050
https://it-notes.dragas.net/2025/01/29/improving-snac-performance-with-nginx-proxy-cache/
I decided to prematurely optimize and adjust this for my apache2 httpd server in debian where I run snac.

I've never done any caching etc before so it was a nice adventure to learn something new. The documentation helped and in the end it wasn't very hard. I learned a bit about some http headers and regex on the way too.

Basically it works like this:
Enable the relevant modules:

a2enmod expires cache cache_disk

Be sure "htcacheclean" is running to clean up old disk cache. (under debian see /etc/default/apache-htcacheclean or else the relevant systemd service)
Then add to the snac virtualhost config:

    CacheRoot /var/cache/apache2/mod_cache_disk
CacheQuickHandler off
CacheLock on
#Optional while testing stuff;
CacheDetailHeader on

#My Instance ist not at the root, but under "/social"; so this needs to be adapted:
<LocationMatch "^/social/[^/]+/s">
CacheEnable disk
ExpiresActive On
ExpiresDefault "access plus 30 days"
</LocationMatch>
This will use the disk cache to cache everything under the /s/ Path, same as the original ngnix tutorial, Utilizing the mod_expires to generate the appropriate cache headers (for lazy ones like me), In this case caching it for 30 days.
Further reading and all options explained under https://httpd.apache.org/docs/2.4/caching.html ff

Thanks for the initial tutorial @itnotes@snac.it-notes.dragas.net

Edit:
Oh and don't hesitate to tell me what I did stupid while setting this up, maybe in nicer words, if it is. And also I can't get the markdown Code formatting working apparently. Well. Sorry for all the edits.

#Fediverse #Hosting #ITNotes #Networking #apache2 #httpd #Ownyourdata #Server #Snac #Snac2 #Social #Tipsandtricks #Tutorial #Web #Debian
snac.it-notes.dragas.netIT Notes (@itnotes@snac.it-notes.dragas.net)2 following, 85 followers · **Improving snac Performance with Nginx Proxy Cache** https://it-notes.dragas.net/2025/01/29/improving-snac-performance-with-nginx-proxy-cache/ #Data #Fediverse #Freebsd #Hosting #ITNotes #Networking #Nginx #NoteHUB #Ownyourdata #Server #Snac #Snac2 #Social #Tipsandtricks #Tutorial #Web

We've tried to provide good reasons for why changing a software license from truly #opensource to some source-available license makes little sense from a business perspective (in our opinion & experience).

We won't be changing the #Apache2 license for our products. Our main goal is to provide users with good products & help them use these efficiently.

Read more in our latest blog post: ➡️victoriametrics.com/blog/open-

Apache2 permissions “hack”
It’s not stupid if [the last part] works, right? Right? 1. We need a new group: website 2. We need a user: frank 3. Simple website where everything is put into /var/www/html/ sudo addgroup website sudo adduser frank website sudo adduser www-data website Let’s see if Frank belongs to the right groups: groups frank The result should look so…
---
3xn.nl/projects/2024/08/04/apa
---
#apache2 #chown #html #newgrp #ownership #permissions

3xn.nlApache2 permissions “hack” – Fox’s Projects

This is just beautiful! The best #Android client for #FreshRSS. You should check it out, if not yet: github.com/Ashinch/ReadYou/

Still need to get used to some #MaterialYou principles.

Oh, and I set up #FreshRSS on my #SynologyNAS the way it should be. No #docker. Just #MariaDB, #WebStation, #PHP and #apache2. Everything from the official #Synology packages.

GitHubGitHub - Ashinch/ReadYou: An Android RSS reader presented in Material You style.An Android RSS reader presented in Material You style. - Ashinch/ReadYou