Last modified by Eleni Cojocariu on 2026/04/23 13:53

Hide last authors
Eleni Cojocariu 16.4 1 {{warning}}
Eleni Cojocariu 16.5 2 WIP: documentation page is being refactored and improved at: [[Apache Server Key Configurations>>documentation.xs.admin.installation.http-reverse-proxy.apache-key-configurations.WebHome]], check all its children pages for full documentation.
Eleni Cojocariu 16.3 3 {{/warning}}
4
Vincent Massol 16.2 5 Example inspired from the config for https://www.myxwiki.org (with only the important parts):
Thomas Mortagne 1.1 6
Thomas Mortagne 15.1 7 * Any acces to port ##80## redirect to port ##443##
8 * Proxy the port ##443## to the port ##8080## (where most application servers are listening by default)
9 * Redirect ##/## access to ##/xwiki/##
10 * Make sure XWiki have enough information to know what is the source URL
11 * Make sure that special characters like ##/## and ##+## are allowed by Apache
Raphaël Jakse 7.1 12 * Mind the "noncanon" keyword. Without it, URLs containing semicolons will be mangled
Thomas Mortagne 16.1 13 * Enable WebSocket
Thomas Mortagne 3.1 14
Thomas Mortagne 11.1 15 {{code}}
Thomas Mortagne 1.1 16 <VirtualHost *:80>
17 ServerName mydomain.com
18 ServerAlias *.mydomain.com
19
20 RewriteEngine On
Thomas Mortagne 4.1 21 RewriteCond %{HTTPS} off
Thomas Mortagne 1.1 22 RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
23 </VirtualHost>
24
25 <VirtualHost *:443>
26 ServerName mydomain.com
27 ServerAlias *.mydomain.com
28
29 DocumentRoot /var/www/
30
31 ErrorLog /var/log/apache2/xwiki-error.log
32 CustomLog /var/log/apache2/xwiki-access.log combined
33
34 RedirectMatch ^/$ /xwiki/
35
36 <Location /xwiki>
37 Order Deny,Allow
38 Satisfy Any
39 </Location>
40
41 AllowEncodedSlashes NoDecode
42
43 ProxyRequests Off
44 <Proxy *>
45 Order deny,allow
46 Allow from all
47 </Proxy>
48 ProxyPreserveHost On
Tom Wise 14.1 49 ProxyPass /xwiki http://localhost:8080/xwiki nocanon upgrade=websocket
Thomas Mortagne 13.1 50 ProxyPassReverse /xwiki http://localhost:8080/xwiki nocanon
Thomas Mortagne 1.1 51
52 ## Workaround for https://bz.apache.org/bugzilla/show_bug.cgi?id=58001 (ProxyPreserveHost does not includes Forwarded)
53 RequestHeader set Forwarded "proto=https"
54
55 # TODO: add your SSL setup
56 </VirtualHost>
57 {{/code}}

Get Connected