More Configurations for the NginX HTTP Proxy Server
Last modified by Eleni Cojocariu on 2026/05/20 16:51
Content
Explanation
After setting up the NginX HTTP Server as a Proxy for XWiki, you can add several improvements to the configuration. For example, you can enable HTTPS secure connections. To do this, you need to install SSL support, obtain a certificate and modify your configuration /etc/nginx/sites-available/xwiki (or ##C:\nginx\conf\nginx.conf##). Use an additional server setting:
server {
listen 443 ssl;
server_name yourdomain.com;
ssl on;
ssl_certificate www.example.com.crt;
ssl_certificate_key www.example.com.key;
location /xwiki { proxy_pass http://localhost:8080/xwiki/;
proxy_set_header X-Forwarded-Proto $scheme;
...the rest of the configuration remains the same (##Headers##, ##WebSocket##, Redirection of root to ##/xwiki##)...To redirect HTTP to HTTPS, use a port 80 block:
server {
listen 80;
server_name yourdomain.com;
# Redirect everything to HTTPS
return 301 https://$host$request_uri;Make sure you update the XWiki configuration file (xwiki.cfg) with the new URL, (e.g., xwiki.home=https://localhost/xwiki).
After making changes in the configuration file, test and restart NginX.