My nginx config (sites-enabled) was this:
upstream tomcat {
server 127.0.0.1:8080 fail_timeout=0;
keepalive 64;
}#HTTP
server {
listen 80; #if this is not a default server, remove “default_server”
listen [::]:80 ipv6only=on;server_name wiki.XXX.de; #redirect non-SSL to SSL location / { rewrite ^ https://wiki.XXX.de permanent; }}
https server
server {
listen 443 ssl http2; # we enable HTTP/2 here (previously SPDY)
server_name wiki.XXX.de; # this domain must match Common Name (CN) in the SSL certificate#ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_certificate /etc/nginx/ssl/STAR_XXX_de.pem;
ssl_certificate_key /etc/nginx/ssl/STAR_XXX_de.pem;# If your application is not compatible with IE <= 10, this will redirect visitors to a page advising a browser update # This works because IE 11 does not present itself as MSIE anymore if ($http_user_agent ~ "MSIE" ) { return 303 https://browser-update.org/update.html; }location / {
try_files $uri /xwiki;
}location /xwiki {
client_max_body_size 20M;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_set_header Connection “keep-alive”;
proxy_store off;
proxy_headers_hash_max_size 512;proxy_pass http://127.0.0.1:8080/xwiki;}
}