<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>No proc {} wrapper needed for a literal string. <div class=""><br class=""></div><div class="">The proc is creating a code block or procedure that will be run to get the value, and it’s purpose is to defer assignment, </div><div class="">Typically where the AppConfig assignment is based on another value from AppConfig. </div><div class="">That way, if a variable is changed from it’s default in config.rb, the dependent variable will also be changed. </div><div class=""><br class=""></div><div class="">For example, from config-defaults.rb: </div><div class=""><br class=""></div><div class="">AppConfig[:db_max_connections] = proc { 20 + (AppConfig[:indexer_thread_count] * 2) }</div><div class=""><br class=""></div><div class=""><div><br class=""></div><div>I have used proc {} wrapped around assignments in my config.rb , but I’m not sure that usage is even necessary:</div><div>Now that I think about it, it may only be needed in config-defaults to pick up changes added to config.rb . </div><div>Once config.rb is being executed, there is already an AppConfig created with those defaults, and as long as </div><div>your additions to config.rb are sequential, I don’t think the proc matters most* of the time. </div><div><br class=""></div><div><br class=""></div><div>(*) ‘most of the time’ : </div><div><br class=""></div><div>Where I have needed it is in adding: </div><div><br class=""></div><div>AppConfig[:hostname] = { Socket.gethostname }</div><div># … </div><div>AppConfig[:public_proxy_url] = proc { "<a href="http://#{AppConfig[:hostname]}:8081" class="">http://#{AppConfig[:hostname]}:8081</a>” }</div><div><br class=""></div><div>To use actual host names instead of localhost for proxy urls.</div><div>But I believe that is mostly needed to defer execution until initialization has imported Socket module,</div><div>Because elsewhere I also assign AppConfig[:environment] to either :production or :development </div><div>And use that in conditionals within my config.rb . </div><div>( if :production, then it’s using assigned VHOST names and https: in those proxy settings instead of AppConfig[:hostname] ) </div><div><br class=""></div><div><br class=""></div><div>So I’m thinking I was under the influence of some fuzzy thinking about the initialization process when I wrote my config.rb code. </div><div>It all works as is, but now that I try to reason about it, it’s a bit off! </div><div><br class=""></div><div>— Steve.</div><div><br class=""></div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 30, 2019, at 9:03 AM, Trevor Thornton <<a href="mailto:trthorn2@ncsu.edu" class="">trthorn2@ncsu.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">I think these are the settings in config.rb that make that work correctly (from the documentation):<div class=""><font face="monospace" class="">AppConfig[:frontend_proxy_url] = "<a href="https://staff.myarchive.org/" class="">https://staff.myarchive.org</a>"<br class="">AppConfig[:public_proxy_url] = "<a href="https://public.myarchive.org/" class="">https://public.myarchive.org</a>"</font></div><div class=""><font face="monospace" class=""><br class=""></font></div><div class=""><font face="arial, sans-serif" class="">But we have something like this:</font></div><div class=""><font face="monospace" class="">AppConfig[:frontend_proxy_url] = proc { "</font><span style="font-family:monospace" class=""><a href="https://staff.myarchive.org/" class="">https://staff.myarchive.org</a></span><font face="monospace" class="">" }<br class="">AppConfig[:public_proxy_url] = proc { "</font><span style="font-family:monospace" class=""><a href="https://public.myarchive.org/" class="">https://public.myarchive.org</a></span><font face="monospace" class="">" }</font></div><div class="">with the URL wrapped in <font face="monospace" class="">proc { }</font>. So try both and see if it helps. If the <font face="monospace" class="">proc { }</font> thing works then the documentation might need to be updated.</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 30, 2019 at 8:47 AM Kara Hart <<a href="mailto:kstrosch@wellesley.edu" class="">kstrosch@wellesley.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="gmail_default"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi everyone, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">We just built a new server with <span style="background-color: transparent; font-family: Arial; font-size: 11pt; white-space: pre-wrap;" class="">openjdk 1.8.0_212; </span><span style="background-color: transparent; font-family: Arial; font-size: 11pt; white-space: pre-wrap;" class="">Apache/2.4.6; </span><span style="background-color: transparent; font-family: Arial; font-size: 11pt; white-space: pre-wrap;" class="">5.7.26 MySQL; </span><span style="background-color: transparent; font-family: Arial; font-size: 11pt; white-space: pre-wrap;" class="">CentOS Linux release 7.6.1810.</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I migrated the database from a 2.5.1 version and forced a full re-index by deleting the data directory contents. At the same time we installed certificates to start to serve the PUI and Staff UI over https. My Systems staff added the settings to the apache config file and I edited the config.rb file and entered the lines as suggested in the https setup <a href="https://github.com/archivesspace/tech-docs/blob/master/provisioning/https.md" target="_blank" class="">documentation</a>. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I'm having a problem with the AS not keeping https on the staff side when you click to view or edit records. I can search and get a list of result records in the AS staff UI and navigate around, but when I click on a record to edit or view I'm getting a requested resource is not found on server error. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">EX: a link to a record </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><a href="https://archivesstaff.wellesley.edu/resolve/edit?uri=/repositories/2/resources/51" target="_blank" class="">https://archivesstaff.wellesley.edu/resolve/edit?uri=/repositories/2/resources/51</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">should redirect to <br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><a href="https://archivesstaff.wellesley.edu/resources/51#tree::archival_object_15295" target="_blank" class="">https://archivesstaff.wellesley.edu/resources/51#tree::archival_object_15295</a><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">but instead I get routed to insecure </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><a href="http://archivesstaff.wellesley.edu/resources/51/edit" target="_blank" class="">http://archivesstaff.wellesley.edu/resources/51/edit</a><br class=""></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" class="">with error </font>"Not Found The requested URL /resources/51 was not found on this server."</div><div class="gmail_default">If I change the last url to https, manually, it does render the edit page. </div><div class="gmail_default"><br class=""></div><div class="gmail_default"><span style="font-family:arial,helvetica,sans-serif" class="">Any idea with is going on or of a setting I'm missing somewhere? </span><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><p class="">Thanks, </p><p class="">Kara</p></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div></div><div class=""><div dir="ltr" class="gmail-m_4855132080475018208m_2202132359012109997gmail_signature"><div dir="ltr" class=""><div class=""><font size="2" class=""><font style="font-family:arial" class=""><div style="font-family: arial, helvetica, sans-serif; display: inline;" class=""></div></font><span style="font-family:arial" class="">~~~ </span><span style="font-family:arial" class="">Kara S. Hart </span></font></div><div class=""><div style="font-family:arial" class=""><font size="2" class=""><font class="">Systems Librarian - Library & Technology Services <div style="font-family: arial, helvetica, sans-serif; display: inline;" class="">- </div></font>Wellesley College</font></div><div style="font-family:arial;font-size:small" class=""><br class=""></div></div></div></div></div></div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" rel="noreferrer" target="_blank" class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br class="">
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Trevor Thornton</font><div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">Applications Developer, Digital Library Initiatives</font></div><div class=""><font size="2" style="background-color:rgb(255,255,255)" color="#666666" class="">North Carolina State University Libraries</font></div></div></div></div></div></div></div>
_______________________________________________<br class="">Archivesspace_Users_Group mailing list<br class=""><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<br class=""></div></blockquote></div><br class=""></div></body></html>