[Archivesspace_Users_Group] Archivesspace dropping https in Staff UI

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Fri Aug 30 11:26:40 EDT 2019



> On Aug 30, 2019, at 10:55 AM, Kara Hart <kstrosch at wellesley.edu> wrote:
> 
> I've tried these three different settings.  
> 
> AppConfig[:frontend_proxy_url] = "https://archivesstaff.wellesley.edu <https://archivesstaff.wellesley.edu/>"
> AppConfig[:public_proxy_url] = "https://archives.wellesley.edu <https://archives.wellesley.edu/>"
> 
> AppConfig[:frontend_proxy_url] = proc { "https://archivesstaff.wellesley.edu <https://archivesstaff.wellesley.edu/>" }
> AppConfig[:public_proxy_url] = proc { "https://archives.wellesley.edu <https://archives.wellesley.edu/>" }
> 
> AppConfig[:frontend_proxy_url] = proc { AppConfig[:https://archivesstaff.wellesley.edu <https://archivesstaff.wellesley.edu/>] }
> AppConfig[:public_proxy_url] = proc { AppConfig[:https://archives.wellesley.edu <https://archives.wellesley.edu/>] }
> 
> The last broke AS launching, which makes sense.  I think the default is to use AppConfig[:frontend_url]
> which is AppConfig[:frontend_url] = "http://localhost:8080 <http://localhost:8080/>" by default.  
> 

The “:” indicates a symbol in Ruby, which is a special kind of string constant
https://reactive.io/tips/2009/01/11/the-difference-between-ruby-symbols-and-strings <https://reactive.io/tips/2009/01/11/the-difference-between-ruby-symbols-and-strings>

And   'AppConfig[:https://archivesstaff.wellesley.edu <https://archivesstaff.wellesley.edu/>] ‘ is bad Ruby syntax unless quoted like  'AppConfig[:"https://archivesstaff.wellesley.edu <https://archivesstaff.wellesley.edu/>”] 
But it likely not something you want anyway unless you have assigned something to that value previously.  


> I wonder if that is it.  Because before we made this change the link to the staff interface from the public interface was http://localhost:8080 <http://localhost:8080/> and never rendered.  I wonder if there's another apache setting I need for localhost?
> 

You don’t really want localhost for any of the proxy URLs. 
Localhost is fine for the URLs that are used internally, for example for the frontend or PUI to communicate with the backend. 
Unless you have set things up for multiple frontends on different hosts to talk to a single backend host, all of the services are
Running on the same host, and it’s the localhost.  But “localhost” doesn’t export.  If you send a localhost link to the browser,
It means, in the context of the browser, the same host the browser is running on, not the host the other service is on. 
So the code that adds the PUI link from the staff web app doesn’t add it if the proxy URL points to  “localhost". 




> 
> ~~~ Kara S. Hart 
> Systems Librarian - Library & Technology Services - Wellesley College
> 
> 
> On Fri, Aug 30, 2019 at 9:04 AM Trevor Thornton <trthorn2 at ncsu.edu <mailto:trthorn2 at ncsu.edu>> wrote:
> I think these are the settings in config.rb that make that work correctly (from the documentation):
> AppConfig[:frontend_proxy_url] = "https://staff.myarchive.org <https://staff.myarchive.org/>"
> AppConfig[:public_proxy_url] = "https://public.myarchive.org <https://public.myarchive.org/>"
> 
> But we have something like this:
> AppConfig[:frontend_proxy_url] = proc { "https://staff.myarchive.org <https://staff.myarchive.org/>" }
> AppConfig[:public_proxy_url] = proc { "https://public.myarchive.org <https://public.myarchive.org/>" }
> with the URL wrapped in proc { }. So try both and see if it helps. If the proc { } thing works then the documentation might need to be updated.
> 
> On Fri, Aug 30, 2019 at 8:47 AM Kara Hart <kstrosch at wellesley.edu <mailto:kstrosch at wellesley.edu>> wrote:
> Hi everyone, 
> We just built a new server with openjdk 1.8.0_212; Apache/2.4.6; 5.7.26 MySQL; CentOS Linux release 7.6.1810.
> 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 documentation <https://github.com/archivesspace/tech-docs/blob/master/provisioning/https.md>. 
> 
> 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. 
> 
> EX: a link to a record  
> https://archivesstaff.wellesley.edu/resolve/edit?uri=/repositories/2/resources/51 <https://archivesstaff.wellesley.edu/resolve/edit?uri=/repositories/2/resources/51>
> should redirect to 
> https://archivesstaff.wellesley.edu/resources/51#tree::archival_object_15295 <https://archivesstaff.wellesley.edu/resources/51#tree::archival_object_15295>
> but instead I get routed to insecure 
> http://archivesstaff.wellesley.edu/resources/51/edit <http://archivesstaff.wellesley.edu/resources/51/edit>
> with error "Not Found     The requested URL /resources/51 was not found on this server."
> If I change the last url to https, manually, it does render the edit page. 
> 
> Any idea with is going on or of a setting I'm missing somewhere? 
> Thanks, 
> 
> Kara
> 
> 
> ~~~ Kara S. Hart 
> Systems Librarian - Library & Technology Services - Wellesley College
> 
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
> 
> 
> -- 
> Trevor Thornton
> Applications Developer, Digital Library Initiatives
> North Carolina State University Libraries
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org <mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group <http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20190830/05578653/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4974 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20190830/05578653/attachment.bin>


More information about the Archivesspace_Users_Group mailing list