docs: add Apache and HestiaCP setup instructions to og-proxy.php

This commit is contained in:
2026-02-07 16:45:06 +01:00
parent 2f964b09a0
commit a66abc446d

View File

@@ -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/<USER>/conf/web/<domain>/apache2.ssl.conf_custom
*/
require __DIR__ . '/config.php';