# apache2 configuration example for snac2
# requires modules: proxy, proxy_http

ProxyPreserveHost On

# Main web access point
<Location /social>
    ProxyPass http://127.0.0.1:8001/social
</Location>

# WebFinger
<Location /.well-known/webfinger>
    ProxyPass http://127.0.0.1:8001/.well-known/webfinger
</Location>

# NodeInfo (optional)
<Location /.well-known/nodeinfo>
    ProxyPass http://127.0.0.1:8001/.well-known/nodeinfo
</Location>

# Mastodon API (entry points)
<Location /api/v1/>
    ProxyPass http://127.0.0.1:8001/api/v1/
</Location>

<Location /api/v2/>
    ProxyPass http://127.0.0.1:8001/api/v2/
</Location>

# Mastodon API (OAuth support)
<Location /oauth>
    ProxyPass http://127.0.0.1:8001/oauth
</Location>

# host-meta (optional, needed for some Mastodon API clients)
<Location /.well-known/host-meta>
    ProxyPass http://127.0.0.1:8001/.well-known/host-meta
</Location>
