gbv / coli-conc-server

Home folder, setup, and configuration for the server hosting public coli-conc software.
0 stars 1 forks source link

Migrate additional proxy rules from esx-246 #9

Closed nichtich closed 1 month ago

nichtich commented 4 months ago

Current HTTP Proxy at esx-246 must be switched off. I've cleaned up its Apache configuration but some pieces are missing. I've created an additional config file for nginx-proxy and it works to add headers but I did not manage to migrate the following Apache config:

   <Location /cocoda/rvk>
        Redirect "/cocoda/rvk" "/cocoda/app"
    </Location>
    <Location ~ "/concordances/(?!index\.).+">
        RedirectMatch "^/concordances/(.+)" "/api/concordances/$1"
    </Location>

For instance this nginx rule results in a proxy error although it should be possible:

rewrite /cocoda/rvk /cocoda/app permanent;

In addition

   <Location /login>
        Order allow,deny 
        Allow from all  
        AllowMethods GET HEAD POST PUT PATCH DELETE OPTIONS

        ProxyPass http://esx-190.gbv.de/login/
        ProxyPassReverse http://esx-190.gbv.de/login/
        RequestHeader set X-Forwarded-Proto "https"

        RewriteEngine on
        RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
        RewriteRule .* ws://esx-190.gbv.de:80/login/ [P]
    </Location>
nichtich commented 1 month ago

Done or not needed except maybe #11