Skip to content

Instantly share code, notes, and snippets.

View PhatKoala's full-sized avatar

Stewart Walter PhatKoala

View GitHub Profile
@nurtext
nurtext / .htaccess
Last active May 1, 2023 19:24
Tell apache we're on HTTPS if reverse proxy is serving the site using SSL
# Let apache know we're behind a SSL reverse proxy
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
# Redirect to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IFModule>
@Ocramius
Ocramius / Caddyfile
Last active March 11, 2024 22:14
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}