Debug Proxy Configuration

Last modified by Eleni Cojocariu on 2026/03/19 07:54

Content

Steps

To check that your proxy configuration is properly read by XWiki and confirm whether the server can access the Internet:

  1. Create a Page (for example: Sandbox.ProxyDebug).
  2. Edit the Page with the Wiki editor.
  3. Insert the following Groovy script to list environment variables and Java system properties:
    {{groovy}}
    println "== Environment Variables =="
    System.getenv().each { name, value -> println "Name: {{{$name}}} = Value {{{$value}}}" }
    println ""
    println "== Java System Properties =="
    System.getProperties().each { name, value -> println "Name: {{{$name}}} = Value {{{$value}}}" }
    {{/groovy}}
  4. Insert the following Velocity test to check HTTP connectivity and if your XWiki instance is able to access the Internet:
    == Test HTTP Access ==
    Your XWiki server's IP is:
    {{velocity}}
    $xwiki.getURLContent("http://httpbin.org/ip")
    {{/velocity}}
    
    == Test HTTPS Access ==
    Your XWiki server's IP is:
    {{velocity}}
    $xwiki.getURLContent("https://httpbin.org/ip")
    {{/velocity}}
    
  5. Save the Page and notice the information on the Page.

FAQ

Why can’t I execute the script?

You need programming rights to run scripts.

Can I use any other service than the "httpbin" service to test Internet connectivity?

Yes, you can use any other service that returns a valid response over HTTP or HTTPS, including https://www.google.com. Using httpbin.org is convenient because it returns your public IP address, which makes it easy to confirm that the request goes through the proxy.

Get Connected