Hi folks,
I’m really close to getting XWiki up and running the way I want, but at the moment I’m only able to access it from within my network.
I’m trying to employ the same exact Apache2 reverse proxy approach as I use successfully with other resources on my network, but it’s not working for XWiki. I’m running Debian 12 and XWiki 15.9 installed via the .deb package. I’ve gone through several other reverse proxy posts on here that I’ve found to no success.
I have a machine named ‘proxy’ that receives all my network’s web traffic. Its 000-default.conf file looks like:
<VirtualHost *:80>
RewriteEngine on
[other omitted rewrites]
RewriteCond %{SERVER_NAME} ^cms
RewriteRule ^/(.*)$ https://cms//$1 [R=301]
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The default-ssl.conf file looks like this:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName cms.example.com
ErrorLog ${APACHE_LOG_DIR}/cms-error.log
CustomLog ${APACHE_LOG_DIR}/cms-access.log combined
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
ProxyPreserveHost On
ProxyPass / http://cms:8080/xwiki/
ProxyPassReverse / http://cms:8080/xwiki/
</VirtualHost>
</IfModule>
The .conf files on the cms machine are pure vanilla.
On my local network, I can go to http://cms:8080/ and everything works just fine. When I try to visit cms.example.com, however, I get the following behaviours:
- http://cms.example.com: Empty response
- http://cms.example.com/xwiki/: redirects to https://cms.example.com and gives the following error:
HTTP ERROR 500 javax.servlet.ServletException: Failed to extract the Entity Action from URL [http://cms.example.com/xwiki/wiki]
URI: /xwiki/wiki
STATUS: 500
MESSAGE: javax.servlet.ServletException: Failed to extract the Entity Action from URL [http://cms.example.com/xwiki/wiki]
SERVLET: action
CAUSED BY: javax.servlet.ServletException: Failed to extract the Entity Action from URL [http://cms.example.com/xwiki/wiki]
CAUSED BY: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
- https://cms.example.com: Redirects to http://cms.example.com/xwiki/bin/view/Main/ and gives an empty response
- https://cms.volfied.net/xwiki/bin/view/Main/: Serves up a broken text-only version of the main page.
Any sense of what I’m doing wrong? This same approach has gone just fine for other sites and services that I run locally on their own VMs.
Thanks for any help you can offer.