Hi,
how do I convert this Apache config to Caddy?
Apache has balancer proxy to Ruby-based forum.
It serves static files, and for what is not found
is server by forum.
<VirtualHost *:80>
ServerName forum.example.com
DocumentRoot /var/www/forum/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/forum/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
RewriteEngine On
<Proxy balancer://thins>
BalancerMember http://localhost:5000
</Proxy>
# Redirect forum posts
RewriteRule ^/topics/(.*)/posts/(.*) /posts/$2 [L,R=301]
Include /etc/apache2/forum-redirects.conf
# included forum-redirects.conf file has many lines like these two lines:
RewriteRule ^/topics/1$ /forums/1/topics/1 [L,R=301]
RewriteRule ^/topics/2$ /forums/1/topics/2 [L,R=301]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^/.*$ balancer://thins%{REQUEST_URI} [P,QSA,L]
ProxyPassReverse / balancer://thins/
<Proxy *>
Order allow,deny
allow from all
</Proxy>
ErrorLog ${APACHE_LOG_DIR}/forum-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/forum-access.log anoncommon
</VirtualHost>