This question about Installation of Foswiki: Asked

Foswiki behind reverse proxy

I installed Foswiki on a local computer.
http://<localcomputer>:<localport>/foswiki
It works nice for many years. This computer is not reachable by the internet.

Now I want to access it from the internet through a reverse Apache2 proxy. Therefor I have a domain name: foswiki.<mydomain.com>. On the proxy server i have:
<VirtualHost *:443>
  ServerName foswiki.<mydomain.com>

  some SSL stuff

  ProxyPreserveHost On
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyRequests On
  ProxyPreserveHost On
  ProxyPass / http://<localcomputer>:<localport>/foswiki/
  ProxyPassReverse / http://<localcomputer>:<localport>/foswiki/
</VirtualHost>

Using the link on an external computer: https://foswiki<mydomain.com>; I can see the texts from the front page, but the layout is not OK. The logo is not shown. I tried many things, but not the correct one yet....

Other proxies of the same proxy server are working correctly. They redirect to other computers than the Foswiki installation.

What am I missing?

-- RichardVinke - 09 Aug 2022

The external link is https. The internal link is http. No SSL. In the source code of the external link are a lot of links, starting with http://foswiki.<mydomain.com>; in stead of https. But how can I tell the proxy server to translate these to https?

-- RichardVinke - 09 Aug 2022

Hi Richard, I have struggled/do struggle with understanding the reverse proxy functionality. I believe that what you are asking (translate http -> https) is not a function of the reverse proxy. I believe you can address the issue by configuring Foswiki to return https links.

In configure expert options you find:

General Settings > Web URLs and Paths > Permitted redirect host URLs {PermittedRedirectHostUrls}

You need to set this to the required value.

-- BramVanOosterhout - 23 Oct 2022

Richard, I am implementing a reverse proxy (nginx) in front of a collection of sites. I notice that older sites don't handle a proxy where the port changes well. The symptoms look like what you describe.

For me, 2.1.6 works, 2.1.4 does not. Same nginx configuration.

I notice you use 2.1.0. An upgrade may be in order.

-- BramVanOosterhout - 23 Oct 2022
 

QuestionForm edit

Subject Installation of Foswiki
Extension
Version Foswiki 2.1.0
Status Asked
Related Topics
Topic revision: r4 - 23 Oct 2022, BramVanOosterhout
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy