[Archivesspace_Users_Group] Serving ArchivesSpace with prefix and proxy [was: Mysql connector issues with a source build]

Steven Majewski sdm7g at virginia.edu
Thu Jul 23 18:32:21 EDT 2015


From my experience, I have to disagree with Brian.  Leave out the _prefix settings. 
They are set by a proc in config-defaults based on the value of AppConfig[:{frontend,public}_url] 

https://github.com/archivesspace/archivesspace/blob/master/common/config/config-defaults.rb#L55 <https://github.com/archivesspace/archivesspace/blob/master/common/config/config-defaults.rb#L55>

So if frontend_url is set properly, frontend_prefix should get set properly from that proc. 
It should not be the whole URL, but just the path, so in your case, if you do want to set it 
manually, it should be: “/archivesspace/frontend/“  


I’ve been trying several configurations that mostly (90+% ) work, and I think I’ve finally
found the one that works 100% for me.  (Still testing.)  There are a bunch of issues. 
I’ll follow up with a longer post ASAP. 



— Steve Majewski




> On Jul 23, 2015, at 4:57 PM, David Hietpas <hietpasd at uwosh.edu> wrote:
> 
> Well it got a little better, woohoo!  The links now appear to be properly structured but all the asset URL's are messed up... hmm.  I've attached a screenshots.  One of the screenshots shows the APP_PATH too.  So how would I get the assets to load correctly?
> 
> config.rb
>    AppConfig[:frontend_url] = "http://localhost:8090/archivesspace/frontend <http://localhost:8090/archivesspace/frontend>"
>    AppConfig[:frontend_prefix] = proc {"http://#{AppConfig[:hostname]}/archivesspace/frontend"}
>   
> Apache:
>     ProxyPass /archivesspace/frontend http://localhost:8090/archivesspace/frontend <http://localhost:8090/archivesspace/frontend>
>     ProxyPassReverse /archivesspace/frontend http://localhost:8090/archivesspace/frontend <http://localhost:8090/archivesspace/frontend>
> 
> Thanks for the help!
> 
> 
> On Thu, Jul 23, 2015 at 3:12 PM, Brian Hoffman <brianjhoffman at gmail.com <mailto:brianjhoffman at gmail.com>> wrote:
> I think you still need to fill out the _prefix params. Also, you should probably use ProxyPass and ProxyPassReverse rather than mod_rewrite: http://httpd.apache.org/docs/2.4/rewrite/avoid.html <http://httpd.apache.org/docs/2.4/rewrite/avoid.html>
> 
> If you open up a Javascript console in the frontend application, and type APP_PATH, you should see “/frontend/“
> 
> Brian
> 
> 
> On Jul 23, 2015, at 8:39 AM, David Hietpas <hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu>> wrote:
> 
>> Also I should note, all the hrefs and forms are not picking up the prefix either.
>> 
>> On Wed, Jul 22, 2015 at 1:27 PM, David Hietpas <hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu>> wrote:
>> Thanks Chris.  I saw the version number and assumed it would work from 1.0.2 and up.
>> 
>> I tried what you suggested yesterday without success.  I've attached a screenshot with what is happening with my config information with the setup you suggested.
>> 
>> config.rb:
>> AppConfig[:backend_url] = "http://localhost:8092 <http://localhost:8092/>"
>> AppConfig[:frontend_url] = "http://localhost:8090 <http://localhost:8090/>"
>> AppConfig[:solr_url] = "http://localhost:8093 <http://localhost:8093/>"
>> AppConfig[:public_url] = "http://localhost:8091 <http://localhost:8091/>"
>> 
>> 
>> AppConfig[:frontend_proxy_url] = "http://localhost/archivesspace/frontend <http://localhost/archivesspace/frontend>"
>> AppConfig[:public_proxy_url] = "http://localhost/archivesspace/public <http://localhost/archivesspace/public>"
>> 
>> 
>> Apache:
>>     RewriteRule ^/archivesspace/frontend$ http://localhost:8090/ <http://localhost:8090/> [L,P]
>>     RewriteRule ^/archivesspace/frontend/(.*)$ http://localhost:8090/$1 <http://localhost:8090/$1> [L,P]
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Wed, Jul 22, 2015 at 12:06 PM, Chris Fitzpatrick <Chris.Fitzpatrick at lyrasis.org <mailto:Chris.Fitzpatrick at lyrasis.org>> wrote:
>> 
>> 
>> 
>> 
>> Hi David,
>> 
>> 
>> 
>> Wow, this documentation is extremely outdated ( from v1.0.2 ). 
>> 
>> 
>> 
>> I'll update this. 
>> 
>> 
>> 
>> But the new way for adding this is to use the proxy_url settings in the config.rb file: 
>> 
>> https://github.com/archivesspace/archivesspace/blob/master/common/config/config-defaults.rb#L156-L157 <https://github.com/archivesspace/archivesspace/blob/master/common/config/config-defaults.rb#L156-L157>
>> 
>> Change your url that you're proxying here, like 
>> 
>> AppConfig[:public_proxy_url] = "http://my.aspace.edu/public <http://my.aspace.edu/public>"
>> 
>> AppConfig[:frontend_proxy_url] = "http://my.aspace.edu/staff <http://my.aspace.edu/staff>"
>> 
>> 
>> 
>> 
>> 
>> 
>> Does that make sense? No need to compile from source for this...
>> 
>> b,chris. 
>> 
>> 
>> 
>> Chris Fitzpatrick | Developer, ArchivesSpace
>> Skype: chrisfitzpat  | Phone: 918.236.6048
>> http://archivesspace.org/ <http://archivesspace.org/>
>> 
>> 
>> From: archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org><archivesspace_users_group-bounces at lyralists.lyrasis.org <mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of David Hietpas <hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu>>
>> Sent: Wednesday, July 22, 2015 6:34 PM
>> To: Archivesspace Users Group
>> Subject: Re: [Archivesspace_Users_Group] Mysql connector issues with a source build
>>  
>> Hi Brian,
>> 
>> As I mentioned in the original email, I'm following the instructions posted from ArchivesSpace Github to setup a installation with prefixes (https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md <https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md>).  I have to use prefixes at our institute, I can't use sub-domains due to policies.
>> 
>> When I start with the original zip file, I don't run into this problem and the app starts up fine.  However, I'm plagued with url issues (css, js, assets, etc...) from the app when setting up the application with prefixes through Apache.
>> 
>> Thanks.
>> 
>> 
>> On Wed, Jul 22, 2015 at 11:24 AM, Brian Hoffman<brianjhoffman at gmail.com <mailto:brianjhoffman at gmail.com>> wrote:
>> Hi David,
>> 
>> Why are you building the application from source rather than just downloading the zip and starting there? Can you confirm that you have the same problem when you start from the ZIP file?
>> 
>> Brian
>> 
>> 
>> On Jul 22, 2015, at 11:07 AM, David Hietpas <hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu>> wrote:
>> 
>>> Due to Archon migrations, I installed Aspace v1.0.4 (https://github.com/archivesspace/archivesspace/releases/tag/v1.0.4 <https://github.com/archivesspace/archivesspace/releases/tag/v1.0.4>) without issue but our University will not allow sub-domains so I have to use the Prefix method explained here (https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md <https://github.com/archivesspace/archivesspace/blob/master/README_PREFIX.md>)
>>> 
>>> So I reinstalled using the 1.0.4 from the source code adding the config/config.rb with the proper prefixes just as instructed.  I ran "build/run dist".  Unzipped the compiled code.  I put the mysql-connector-java.jar in the archivesspace/lib directory like I had in the working version above.  I've attached a screenshot.
>>> 
>>> It can't find the mysql-connector-java though it is in the lib directory of Archivesspace.  I've drop the exact version 5.1.13 as well as the newest.  It works perfectly fine in the non-source version but not the source build version.
>>> 
>>> Error: http://pastebin.com/FQVJEjEi <http://pastebin.com/FQVJEjEi>
>>> 
>>> Please advise.  Thanks.
>>> 
>>> -- 
>>> David Hietpas
>>> University of Wisconsin Oshkosh
>>> hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu> | 920-424-0291
>>> <lib-jar-example.jpg>_______________________________________________
>>> 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 <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>
>> 
>> 
>> 
>> 
>> -- 
>> David Hietpas
>> University of Wisconsin Oshkosh
>> hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu> | 920-424-0291
>> 
>> _______________________________________________
>> 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>
>> 
>> 
>> 
>> 
>> -- 
>> David Hietpas
>> University of Wisconsin Oshkosh
>> hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu> | 920-424-0291
>> 
>> 
>> 
>> -- 
>> David Hietpas
>> University of Wisconsin Oshkosh
>> hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu> | 920-424-0291
>> _______________________________________________
>> 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 <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>
> 
> 
> 
> 
> -- 
> David Hietpas
> University of Wisconsin Oshkosh
> hietpasd at uwosh.edu <mailto:hietpasd at uwosh.edu> | 920-424-0291
> <example-bad-assets.jpg><example-links-working.jpg>_______________________________________________
> 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/20150723/e4fcac66/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4943 bytes
Desc: not available
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150723/e4fcac66/attachment.bin>


More information about the Archivesspace_Users_Group mailing list