To redirect HTTP traffic to HTTPS in Nginx for an XWiki installation, you can open the Nginx configuration file for editing and insert a server block that listens on port 80 and returns a 301 redirect to the HTTPS version of your site. Here’s an example of such a server block
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
This configuration will catch all HTTP traffic on port 80 and redirect it to the HTTPS version of your site using a permanent 301 redirect1.
you can also try Nginx proxy for ssl issue - Help / Discuss - XWiki Forum