mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

12K
active users

#ApacheWebServer

0 posts0 participants0 posts today

An #askFedi for people who know #ApacheWebServer . Is there a way to change *just* the mime type a file is sent as?

I'm sending .rss and .atom files as application/{rss,atom}+xml, but dominant browsers arbitrarily decided these should be downloaded instead of opened in place like they do with plain application/xml files.

So I want to change the mime type to application/xml but only if the request has an Accept: header that does not include application/*+xml or similar. How?

Nachdem ich eine ziemliche Odysee hinter mir habe, Matrix als Docker Umgebung lauffähig zu installieren - und damit ja alles andere als allein bin, da die Matrix-Dokumentation und diverse Anleitungen so la la sind (weil nicht mehr aktuell oder sie setzen Wissen zwischen den Zeilen voraus) - habe ich, wie versprochen, meine funktionierene Docker-Konfiguration Schritt für Schritt dokumentiert.

Das Ganze setzt auf einen debian-basierten Server mit Docker, Docker-Compose und Apache-Webserver.

Ihr findet die Doku auf meiner Webseite
https://www.crazy-to-bike.de

Direktlink:
https://matrix-tutorial.2goto.de

Vielen Dank an
@fabbecker@social.tchncs.de und @jonas@social.violoncello.ch für ihre Hilfe beim Lösen des ein oder anderen Problems auf dem Weg zum Ziel.

#Matrix #Element #Element-Web #ElementWeb #Synapse #Synapse-Admin #SynapseAdmin #Docker #DockerCompose #Docker-Compose #Apache #Apache2 #ApacheWebserver #Apache-Webserver #Anleitung #Tutorial #Doku #Dokumentation

If you have ever wanted to configure your Apache web server to only ever serve session cookies when a visitor makes an automated GDPR data processing objection through the Do Not Track (DNT) and Global Privacy Control (GPC, Sec-GPC) HTTP request headers, but couldn't figure out how to set that up; well, here's a recipe.

michael.kjorling.se/blog/2023/

You're welcome. 🙂

michael.kjorling.seRespecting DNT / GPC HTTP headers by only serving session cookies from Apache – Michael Kjörling
technologytales.comUsing .htaccess to control hotlinking | TechnologyTales.comThere are times when blogs cease to exist and the only place to find the content is on the Wayback Machine. Even then, it is in danger of being lost completely. One such example is the subject of this post. Though this website makes use of the facilities of Cloudflare for various functions that include the blocking of image hotlinking, the same outcome can be achieved using .htaccess files on Apache web servers. It may work on Nginx to a point too but there are other configuration files that ought to be updated instead of using a .htaccess when some frown upon the approach. In any case, the lines that need adding to .htaccess are listed below though the web address needs to include your own domain in place of the dummy example provided: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC] RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC] The first line turns on the mod_rewrite engine and you may have that done anyway. Of course, the module needs enabling in your Apache configuration for this to work and you have to be allowed to perform the required action as well. This means changing the Apache configuration files. The next pair of lines look at the HTTP referer strings and the third one only allows images to be served from your own web domain and not others. To add more, you need to copy the third line and change the web address accordingly. Any new lines need to precede the last line that defines the file extensions that are to be blocked to other web addresses. RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC] RewriteRule \.(gif|jpe?g|png|bmp)$ /images/image.gif [L,NC] Another variant of the previous code involves changing the last line to display a default image showing others what is happening. That may not reduce the bandwidth usage as much as complete blocking but it may be useful for telling others what is happening.