OverviewFilesCommitsIssuesDocsReleasesPeers

atproto-bridge / infra / 7rnx / apache / atproto-7rnx.conf

28 lines · conf ref:
# ONE Host-routed vhost for all *.7rnx.net (the apex 7rnx.net keeps its own vhost).
# Merged deliberately: two separate <VirtualHost *:443> blocks (pds + wildcard) competed
# and the wildcard shadowed pds.7rnx.net (POSTMORTEM §6). One vhost = no ambiguity.
<VirtualHost *:443>
    ServerName pds.7rnx.net
    ServerAlias *.7rnx.net
    SSLEngine on
    # mod_md supplies the *.7rnx.net wildcard cert (no SSLCertificateFile here).
    ProxyPreserveHost On
    ProxyTimeout 3600
    RequestHeader set X-Forwarded-Proto "https"
    RewriteEngine On

    # --- pds.7rnx.net: full PDS proxy to millipds on stortron over VPN (incl. firehose WS) ---
    RewriteCond %{HTTP_HOST} ^pds\.7rnx\.net$ [NC]
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule ^/(.*)$ ws://10.22.0.2:3000/$1 [P,L]
    RewriteCond %{HTTP_HOST} ^pds\.7rnx\.net$ [NC]
    RewriteRule ^/(.*)$ http://10.22.0.2:3000/$1 [P,L]

    # --- any other <handle>.7rnx.net: serve ONLY atproto handle resolution ---
    RewriteRule ^/\.well-known/atproto-did$ http://127.0.0.1:8099/.well-known/atproto-did [P,L]
    RewriteRule ^ - [R=404,L]

    ErrorLog ${APACHE_LOG_DIR}/atproto-7rnx-error.log
    CustomLog ${APACHE_LOG_DIR}/atproto-7rnx-access.log combined
</VirtualHost>