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:

218
active users

#httpd

0 posts0 participants0 posts today
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
For anyone who has snac deployed with httpd on OpenBSD (especially on a resource-restricted system) and is running into lag, errors, or service crashes, I highly recommend using nginx instead of httpd. Nginx--in addition to simply being faster in general--provides easy access to media caching (see @stefano@bsd.cafe's excellent article) and robust rate-limiting/traffic throttling controls.

Switching and properly tuning my nginx config seems to be (mostly) shielding my little VPS from being overwhelmed when someone with thousands of followers boosts one of my posts.

#snac #fediverse #activitypub #openbsd #nginx #httpd
IT NotesImproving snac Performance with Nginx Proxy Cache
More from Stefano Marinelli
Continued thread

Scheduling HTTP Streams
by Alexander Krizhanovsky.

Understand how a web server manages millions of concurrent web requests.
* Differences in treatment for progressive JPEG vs a PNG.
* Resilient against DDoS attacks and other vulnerabilities.
* Compare Nginx, Envoy, Apache.

fosdem.org/2025/schedule/event

Live stream:
live.fosdem.org/watch/ua2220

Is it good idea to host my website with #OpenBSD #httpd without domain name, just ip address? I do not need domain because of better remembering, but there are maybe other reasons why to use domain... I suppose there should be a problem with tls and maybe https, I'd like to use https but when site is just static https may not be required.