From a66abc446d07ba25647ef42bc45c5ebe08e398d9 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Sat, 7 Feb 2026 16:45:06 +0100 Subject: [PATCH] docs: add Apache and HestiaCP setup instructions to og-proxy.php --- docs/pow-server/og-proxy.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/pow-server/og-proxy.php b/docs/pow-server/og-proxy.php index b0bbc27..0e0e63f 100644 --- a/docs/pow-server/og-proxy.php +++ b/docs/pow-server/og-proxy.php @@ -6,10 +6,22 @@ * If User-Agent matches crawler → proxy to this script * Else → serve static index.html * + * Example Apache config (in VHost): + * RewriteEngine On + * RewriteCond %{HTTP_USER_AGENT} Twitterbot|facebookexternalhit|TelegramBot|Discordbot|Slackbot|WhatsApp [NC] + * RewriteRule ^/listing/(.*)$ https://pow.dgray.io/og-proxy.php?listing=$1 [P,L] + * + * Required modules: sudo a2enmod rewrite proxy proxy_http + * * Example Nginx config: - * if ($http_user_agent ~* "Twitterbot|facebookexternalhit|TelegramBot|Discordbot|Slackbot|LinkedInBot|WhatsApp") { - * proxy_pass https://pow.dgray.io/og-proxy.php; + * location /listing/ { + * if ($http_user_agent ~* "Twitterbot|facebookexternalhit|TelegramBot|Discordbot|Slackbot|WhatsApp") { + * rewrite ^/listing/(.*)$ /og-proxy.php?listing=$1 break; + * proxy_pass https://pow.dgray.io; + * } * } + * + * HestiaCP: Place config in /home//conf/web//apache2.ssl.conf_custom */ require __DIR__ . '/config.php';