Open edX behind apache hosting proxy

Hello
I am trying to put openedx tutor behind apache2 proxy. How to configure it to work correctly and automatically forward to caddy on port 81 for example ?

I found a little help over net … so here they are :slight_smile:

on sites-enabled create a site.conf
inside the file

<VirtualHost *:80>

  #Niezbedne by "oszukac" serwer caddy ze zapytania przychodza z tej domeny a nie z localhost
  ProxyPreserveHost On
  ServerName edx.local

  #Najpierw adresy serwisow cud ...
  ProxyPass /cudserver http://localhost:8080/cudserver
  ProxyPassReverse /cudserver http://localhost:8080/cudserver

  ProxyPass /restapi http://localhost:8080/restapi
  ProxyPassReverse /restapi http://localhost:8080/restapi

  ProxyPass /cud-math http://localhost:8080/cud-math
  ProxyPassReverse /cud-math http://localhost:8080/cud-math

  ProxyPass /cud-code http://localhost:8080/cud-code
  ProxyPassReverse /cud-code http://localhost:8080/cud-code
  
  #... a na koncu przekierowanie root zeby poprzednie zostaly uwzglednione 
  ProxyPass / http://127.0.0.1:8010/
  ProxyPassReverse / http://127.0.0.1:8010/


</VirtualHost>

also found a way in https:

<VirtualHost *:80>
  # Redirect HTTP requests to HTTPS
  ServerName edx.local

  Redirect permanent / https://edx.local/

  ProxyPass / http://localhost:8010/
  ProxyPassReverse / http://localhost:8010/

</VirtualHost>

<VirtualHost *:443>
  ServerName edx.local
  
#  # SSL Configuration
  SSLEngine on
 SSLCertificateFile /local_cert/certificate.crt
  SSLCertificateKeyFile /local_cert/private.key

   ProxyPass configurations for different paths
  ProxyPreserveHost On

  ProxyPass /cudserver http://localhost:8080/cudserver
  ProxyPassReverse /cudserver http://localhost:8080/cudserver

  ProxyPass /restapi http://localhost:8080/restapi
  ProxyPassReverse /restapi http://localhost:8080/restapi

  ProxyPass /cud-math http://localhost:8080/cud-math
  ProxyPassReverse /cud-math http://localhost:8080/cud-math

  ProxyPass /cud-code http://localhost:8080/cud-code
 ProxyPassReverse /cud-code http://localhost:8080/cud-code

  ProxyPass /authn http://localhost:8010/authn
  ProxyPassReverse /authn http://localhost:8010/authn

  ProxyPass / http://127.0.0.1:8010/
  ProxyPassReverse / http://127.0.0.1:8010/
</VirtualHost>

but still … 0auth not working correctly … and no way to go to login/register