<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="padding-bottom: 10px; padding-top: 5px;">
<div style="padding:12px; border:1px solid #8D3970; background-color:#F7F9FA; color:#8D3970; font-size:14px; line-height:22px; font-family: Calibri, Arial, Helvetica, sans-serif;">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<p><br>
</p>
<div class="moz-cite-prefix">Il 08/08/22 09:54, David R Newman ha scritto:<br>
</div>
<blockquote type="cite" cite="mid:777388bb-38ff-208f-ccf3-649410e8f0a2@ecs.soton.ac.uk">
<p><font size="4">Hi Yuri,</font></p>
<p><font size="4">If you were in EPrints 3.4.1 onwards then you could just unset $c-&gt;{host}.&nbsp; However, there are some Bazaar plugins that rely on $c-&gt;{host} being set, so you would need to check to make sure $c-&gt;{host} was not used directly anywhere and update
 appropriately to use $c-&gt;{securehost}.<br>
</font></p>
<p><font size="4">If you are still on 3.3.x, then the best plan is to manually set various URLs through configuration:</font></p>
<p><font size="4">$c-&gt;{http_url} = $c-&gt;{base_url};</font></p>
<p><font size="4">$c-&gt;{http_cgiurl} = $c-&gt;{perl_url};</font></p>
</blockquote>
<p><br>
</p>
<p>It is Eprints 3.3.15.</p>
<p>What happen if I don't set these? It seems to work, only c-&gt;{'frontpage'} is set only from http_url, the other uses ||= to get the value from other variables.</p>
<p>But I agree it is better to set them!<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:777388bb-38ff-208f-ccf3-649410e8f0a2@ecs.soton.ac.uk">
<p><font size="4">I think you should have a cfg/cfg.d/20_baseurls.pl in you archive, if so just add these links after the lines that set the
</font><font size="4"><font size="4">$c-&gt;{base_url} and </font></font><font size="4"><font size="4"><font size="4">$c-&gt;{perl_url} variables.&nbsp; However, this will only work if you have a recent version of 20_baseurls.pl, which prioritises HTTPS over HTTP:</font></font></font></p>
<p><font size="4"><font size="4"><font size="4"><a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Flib%2Fdefaultcfg%2Fcfg.d%2F20_baseurls.pl&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C3ee3414157f34e13b2dd08da7918bf28%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637955444870615191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp;sdata=Cgd2vUIJkMybDz4W9OpJhfw1miOuHnyphs1nTXY1%2Brc%3D&amp;reserved=0" originalSrc="https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/20_baseurls.pl" shash="ak/OdUd5Y0o9dhNTp2LbQ3DjJxZNOgs24M3O8bo0Epd8De+rYFIRTTO2oZSeDo+Dn29Pc3PEeQhBkkdC8re4UU9133oGLmDkojiw0LE07F6UsuSm7QPk/uojygcGG8gZZevWh8apDG+aRu1EvXffT0HvYpvEGOnM782H3FZmSCQ=" moz-do-not-send="true">https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/20_baseurls.pl</a></font></font></font></p>
</blockquote>
<p>Yes, it is. I'll do this.<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:777388bb-38ff-208f-ccf3-649410e8f0a2@ecs.soton.ac.uk">
<p><font size="4"><font size="4"><font size="4">Also, using a copy of 20_baseurls.pl above with the changes I suggested will also only work if $c-&gt;{securehost} is set in a file that is loaded before 20_baseurls.pl (e.g. 10_core.pl).
<br>
</font></font></font></p>
</blockquote>
<p>It is set in 10_core.pl so it should be ok.<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:777388bb-38ff-208f-ccf3-649410e8f0a2@ecs.soton.ac.uk">
<p><font size="4"><font size="4"><font size="4">If you have </font></font></font><font size="4"><font size="4"><font size="4"><font size="4"><font size="4"><font size="4">$c-&gt;{securehost} defined in https.pl, (which seems quite common), you are best renaming
 this to 15_https.pl.&nbsp; Once you have got the appropriate changes in place, it is probably worth running generate_apacheconf and generate_static, although I don't think the former should be needed.&nbsp; Then when you are happy that static pages no longer have any
 HTTP URLs, (by testing in your web browser), it is worth running &quot;epadmin refresh_abstracts&quot; and &quot;epadmin refresh_views&quot; to clear HTTP URLs from those pages as well.</font></font></font></font></font></font></p>
<p><font size="4"><font size="4"><font size="4"><font size="4"><font size="4"><font size="4">Regards</font></font></font></font></font></font></p>
<p><font size="4"><font size="4"><font size="4"><font size="4"><font size="4"><font size="4">David Newman<br>
</font></font></font></font></font></font></p>
<p><br>
</p>
<div class="moz-cite-prefix">On 08/08/2022 8:02 am, Yuri via Eprints-tech wrote:<br>
</div>
<blockquote type="cite" cite="mid:7c0f1bce-b2e6-13ee-373d-c78cb28c0b61@alfa.it">
<pre class="moz-quote-pre" wrap="">CAUTION: This e-mail originated outside the University of Southampton.

Hi!

  I would like to totally switch to https. I've managed most of the
redirects at apache level and it works but, for example, the export for
in views (/cgi/exportview) still point to http, as various backend urls.
Redirects are not perfect because when cgi is involved the browser will
prompt a secure warning because the form will go in http (before
redirect). Looking at the code, seems possible to have only securehost
set and c-&gt;{'host'} commented. Will this work or there will be any issue?


*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" moz-do-not-send="true">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C3ee3414157f34e13b2dd08da7918bf28%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637955444870615191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp;sdata=p3ipF2orM4ItOEXfZ0j9Y%2BbOnBVQ2rKxSQXH%2Fj5ke9o%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="fXdVWsiUL5v6a/KdSEL1bSj8iYFQVqQgy0OBqZmoLJW5tzssFHscueAIy+3F5L8rMK3vXpea5NH7qe4xOXQiXc8CAyvOjTFPQkqnLL3yhnO7XufVh5Ak+bKMcEW7lhgpgTlp9sLJx/UgN2k5YkMZHjwAt5xDZYFJ9z1vxVEPssc=" moz-do-not-send="true">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;amp;data=05%7C01%7Cdrn%40ecs.soton.ac.uk%7C5fd34e01b83a4ceb9c3208da790c5012%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637955391025092451%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=RBSiwRwGzGBMq%2BRPpuM1u8hsQkowgKOL1IZw3eiplYg%3D&amp;amp;reserved=0</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C3ee3414157f34e13b2dd08da7918bf28%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637955444870615191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&amp;sdata=TeIfx0m40BYsI3DJIZgjr0iMB%2FgK3Ncwuf12VgtRuYc%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="MDd5rkJkNDX75LLqCXeKvg0aHk0CtX3pd92O8E8FL+H8f8vJA+Dh81nXfoY4d+UwTlfswpQWds4kZCpqgUZXiY8S+Qr/bsKA4qoUXb2WaI34HBCfxwlgQ3kc+ttHeWM3HuuiujHOn62HlBkLyjs0xrgSuWVeB75Gz7eyq+rqlVM=" moz-do-not-send="true">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;amp;data=05%7C01%7Cdrn%40ecs.soton.ac.uk%7C5fd34e01b83a4ceb9c3208da790c5012%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637955391025092451%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=qXLgmrSNhdhR00LGOD5TmoaujrWk17h4KnNKXVctTlQ%3D&amp;amp;reserved=0</a>
</pre>
</blockquote>
</blockquote>
</div>
</body>
</html>