Hello,
I have asked help from an IA, and it has helped me solved the issue. I have explained every detail to it : context, issue, @vmassol ‘s provided insights, and this is what the IA answered:
Troubleshooting the HTTP/HTTPS Redirect Loop
Your XWiki server and Apache web server are creating an incorrect redirect loop. Here’s what’s happening and how to fix it.
The HTTP/HTTPS Redirection Problem
Your XWiki is accessible via a secure domain (HTTPS), xwiki.linuxvillage.org
. However, XWiki’s internal requests to install extensions are being directed to a HTTP URL: http://xwiki.linuxvillage.org/...
As the forum member identified, this is the root cause. Normally, XWiki should make its internal requests to HTTPS URLs to match the domain. But because it’s using HTTP, the Apache server—which handles the secure connection—sees this HTTP request and tries to redirect it to HTTPS.
This redirect loop (HTTP → HTTPS → HTTP) causes the connection to fail, preventing the extensions from being downloaded and generating the “Server not responding” error. This is a classic web server configuration issue that is often misconfigured by default.
The Solution: Correcting the Apache Configuration
You need to configure your Apache server to communicate correctly with XWiki. To do this, you must instruct Apache to send the appropriate HTTP headers to XWiki, informing it that the initial request was secure.
-
Modify your Apache configuration file
-
Connect to your Debian 12 server via SSH.
-
Your configuration file for xwiki.linuxvillage.org
is likely in /etc/apache2/sites-available/
. The filename could be xwiki.linuxvillage.org.conf
or xwiki-le-ssl.conf
(since you’re using Certbot).
-
Open this file with nano
or vim
:
Bash
sudo nano /etc/apache2/sites-available/xwiki-le-ssl.conf
-
Add the necessary headers
- Inside the
<VirtualHost *:443>
block, add the following lines. These lines tell Apache to include the X-Forwarded-For
and X-Forwarded-Proto
headers, which are essential for XWiki to understand that it’s behind a secure reverse proxy.
Apache
<VirtualHost *:443>
ServerName xwiki.linuxvillage.org
...
# Add these lines
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}e
...
</VirtualHost>
-
Enable the Apache module
-
For these headers to work, the Apache headers
module must be enabled.
-
Run this command if you haven’t already:
Bash
sudo a2enmod headers
-
Restart Apache
- After saving your changes, restart Apache for them to take effect:
Bash
sudo systemctl restart apache2
After these steps, XWiki should receive the correct protocol information (HTTPS) from Apache and will no longer generate internal HTTP URLs. You should be able to install and uninstall extensions without any issues.
Then I asked the IA : the xwiki.conf file or the other created by Certbot? This was the one created by Certbot.
I followed the advice, modified the file, after doing a copy of the configuration file for safety, checked that the headers module was enabled, restarted apache, checked the syntax with apache2ctl configtest
which answered : Syntax OK
.
I installed 3 extensions : no more error message!
Thank you very much for your help and direction, it has helped me a lot! 
(and the IA that helped me! ).