ninedocker/misc/images/dokuwiki/containers/nineapache/apache.conf

38 lines
1.0 KiB
ApacheConf
Raw Normal View History

2024-07-19 14:34:55 +02:00
LoadModule rewrite_module modules/mod_rewrite.so
ServerName nineapache.local
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
ProxyPass /dokuwiki http://dokuwiki/dokuwiki retry=0 keepalive=On
ProxyPassReverse /dokuwiki http://dokuwiki/dokuwiki retry=0
RequestHeader set X-Forwarded-Host "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-Server "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
RequestHeader set Host "%{HTTP_HOST}s"
RequestHeader set X-Forwarded-Proto "http"
DocumentRoot "/app/public"
<Directory "/app/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</Directory>