Xwiki - Rest api over https

hi,

I have xwiki (10.7 stable) on tomcat8 servers and apache2 is proxy.
Page on apache works only on https.

in file xwiki.cfg have xwiki.url.protocol=https
in apache.conf have
ProxyPass /xwiki http://localhost:8080/xwiki
ProxyPassReverse /xwiki http://localhost:8080/xwiki

all working ok, but rest api generates content through http only.

which needs to be configured to make it work properly?

Well thank you.
And sorry, for my English.

Probably means the protocol is explicitly set to HTTP in the wiki descriptor. In general it’s better (and easier since you don’t need to restart) to control this kind of things in the wiki descriptor.

Go to wiki index and edit main wiki descriptor for example. You will find in it a “Secure” property which control if HTTP or HTTPS should be used when generating URLs. Note that subwikis inherit main setup by default so it will apply to the whole farm if you have several wikis (which is usually what you want except is very special cases).

hi,

thank you for the reply

I changed etc/tomacat8/server.xml to

<Connector port="8080"
	secure="true"
	scheme="https"	
         	protocol="HTTP/1.1"
       	connectionTimeout="20000"
            proxyName = "site.com"
	redirectPort="443"/>

my rest is now:

<xwiki xmlns="http://www.xwiki.org">
<link href="https://site.com:**8080**/rest/wikis" rel="http://www.xwiki.org/rel/wikis"/>
<link href="https://site.com:**8080**/rest/syntaxes" rel="http://www.xwiki.org/rel/syntaxes"/>

Port 8080 is wrong. I need to redirect it to the port 443, where is ssl certificate.
On site https://www.xwiki.org/xwiki/rest is correct.
How can I do that? what needs to be edited?

Well thank you.
And sorry, for my English.

hi

in apache config was off ProxyPreserveHost On

now it’s okay

well thank you