EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #10043
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- To: eprints-tech@ecs.soton.ac.uk
- Subject: Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Gunnar Wolf <gwolf@gwolf.org>
- Date: Sat, 15 Mar 2025 17:20:36 -0600
CAUTION: This e-mail originated outside the University of Southampton. Hello Yuri! Thanks for helping me tackle this issue. Yuri Carrer dijo [Thu, Mar 13, 2025 at 08:50:32AM +0100]:
Hi! looking at https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FHow_to_use_EPrints_with_HTTPS&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C160e8d2f453a4befb9cc08dd6417ff7f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638776776557195288%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=eCM%2F4lCDTcS%2FlefKZTNuEZmoONnf03sdfY4Cjf8nlOQ%3D&reserved=0: $c->{host} = 'YOUR-REPOSITORY-DOMAIN'; $c->{port} = 80; $c->{aliases} = []; $c->{securehost} = $c->{host}; $c->{secureport} = 443; $c->{http_root} = undef; while yours: $c->{host} = 'ru.iiec.unam.mx'; $c->{port} = '80'; $c->{aliases} = []; $c->{http_url} = 'https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fru.iiec.unam.mx%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C160e8d2f453a4befb9cc08dd6417ff7f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638776776557213345%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=LAWn%2B1x0ahv0NNI4i5b0klaDgNg76Ts5ZEzwyg6gkC8%3D&reserved=0'; $c->{http_cgiurl} = 'https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fru.iiec.unam.mx%2Fcgi&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C160e8d2f453a4befb9cc08dd6417ff7f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638776776557225145%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=zFK8F7cOUFjmJ9Lspp%2B0DzrQN2KeNG%2BaZ7Cu6E%2FI0%2FQ%3D&reserved=0'; $c->{base_url} = "https://$c->{host}"; $c->{securehost} = $c->{host}; $c->{secureport} = 443; $c->{http_root} = undef; Try to remove: $c->{http_url} = 'https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fru.iiec.unam.mx%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C160e8d2f453a4befb9cc08dd6417ff7f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638776776557236873%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=SDbgbtiSMltDK60vs%2FfBHF4pLnXWLOwCoe5kXgMtMGU%3D&reserved=0'; $c->{http_cgiurl} = 'https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fru.iiec.unam.mx%2Fcgi&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C160e8d2f453a4befb9cc08dd6417ff7f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638776776557248589%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=H%2BFArsFNnZxC1cH%2FCcyGYz5F6qzHQPbaWccWPb5%2BCGw%3D&reserved=0'; $c->{base_url} = "https://$c->{host}";
OK. Tried to do this (and, of course, restarted Apache2 just after doing so). I thought the values you told me to remove were still necessary! However... this was to no avail 🙁 I am getting the exact same behavior.
If you just need redirection to https after login, regenerate the apacheconf and it should work.
No, the redirection to https is working -- but it remains in a redirect loop.
That said, if you want an https-only configuration, if you search the mailing list topic "empty c->{’host‘} in Eprints 3.3.XX" you will find many suggestions for having a full https Eprints 3.3.XX. Also "Eprints with Nginx Proxy Manager as Load Balancer" has some interesting stuff.
Thanks, I'll take a look at those resources.
You can debug rewrite rules in Apache with: LogLevel debug rewrite:trace3 in /usr/share/eprints3/cfg/apache/yoursite.conf if nothing appears, it is the EPrints::Apache::Rewrite doing the redirects and then you need to do the redirect managed as in "empty c->{'host'} in Eprints 3.3.XX".
I am getting the following, repeated seven times, until my client gives up. Do you see anything fishy or revealing? ==> /var/log/apache2/other_vhosts_access.log <== ru.iiec.unam.mx:443 187.207.35.109 - - [15/Mar/2025:23:14:38 +0000] "HEAD /cgi/users/home HTTP/1.1" 302 3892 "-" "lwp-request/6.78 libwww-perl/6.78" ==> /var/log/apache2/error.log <== [Sat Mar 15 23:14:38.309563 2025] [ssl:debug] [pid 814684] ssl_engine_io.c(1106): [client 187.207.35.109:41854] AH02001: Connection closed to child 1 with standard shutdown (server ru.iiec.unam.mx:443) [Sat Mar 15 23:14:38.346005 2025] [ssl:info] [pid 814683] [client 187.207.35.109:41862] AH01964: Connection to child 0 established (server ru.iiec.unam.mx:443) [Sat Mar 15 23:14:38.346186 2025] [ssl:debug] [pid 814683] ssl_engine_kernel.c(2319): [client 187.207.35.109:41862] AH02043: SSL virtual host for servername ru.iiec.unam.mx found [Sat Mar 15 23:14:38.363089 2025] [ssl:debug] [pid 814683] ssl_engine_kernel.c(2235): [client 187.207.35.109:41862] AH02041: Protocol: TLSv1.3, Cipher: TLS_AES_256_GCM_SHA384 (256/256 bits) [Sat Mar 15 23:14:38.363203 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(495): AH00831: socache_shmcb_store (0xfd -> subcache 29) [Sat Mar 15 23:14:38.363228 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(849): AH00847: insert happened at idx=0, data=(0:32) [Sat Mar 15 23:14:38.363239 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(854): AH00848: finished insert, subcache: idx_pos/idx_used=0/1, data_pos/data_used=0/208 [Sat Mar 15 23:14:38.363248 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(516): AH00834: leaving socache_shmcb_store successfully [Sat Mar 15 23:14:38.363395 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(495): AH00831: socache_shmcb_store (0x56 -> subcache 22) [Sat Mar 15 23:14:38.363417 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(849): AH00847: insert happened at idx=2, data=(440:472) [Sat Mar 15 23:14:38.363428 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(854): AH00848: finished insert, subcache: idx_pos/idx_used=0/3, data_pos/data_used=0/648 [Sat Mar 15 23:14:38.363437 2025] [socache_shmcb:debug] [pid 814683] mod_socache_shmcb.c(516): AH00834: leaving socache_shmcb_store successfully [Sat Mar 15 23:14:38.368744 2025] [ssl:debug] [pid 814683] ssl_engine_kernel.c(383): [client 187.207.35.109:41862] AH02034: Initial (No.1) HTTPS request received for child 0 (server ru.iiec.unam.mx:443)
- References:
- [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Gunnar Wolf <gwolf@gwolf.org>
- Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- From: Yuri Carrer <yuri.carrer@unipd.it>
- [EP-tech] Help with redirect loops in EPrints 3.3.16
- Prev by Date: [EP-tech] Contributor_types not registering on RIS import
- Next by Date: Re: [EP-tech] Help with redirect loops in EPrints 3.3.16
- Previous by thread: RE: [EP-tech] Help with redirect loops in EPrints 3.3.16
- Next by thread: [EP-tech] Contributor_types not registering on RIS import
- Index(es):